Shortcuts for Hatching
After a few days of smooth sailing on my trial, and starting to feel very comfortable with using BricsCAD for my 2d drafting, i have hit a bit of a bump in the road with hatching.
In AutoCAD, i normally have all my hatches on the tool palette, and can hatch areas in a variety of patterns, scales and orientations with just one or two clicks.
My first experience with the hatch command felt very clunky in BricsCAD, and i could not see an obvious way to set up hatches on a tool palette.
I can't seem to find a tool bar for hatching, nor does it seem possible to operate the hatch command exclusively from the command line (which i presume would rule out creating a macro). When i opened the ribbon (which i've been trying to avoid using to save space), it gave me access to the quick hatch button, which helped matters somewhat, but still fell short of what i was ideally hoping for.
Bearing in mind that i am a novice when it comes to BricsCAD, and customising CAD programs in general, does anyone have any suggestions that might help me to achieve the kind of 1-click hatching that i'm after?
Many thanks,
Trev
Comments
-
There's a Hatch Pattern Palette, which shows samples of all installed hatches. It pops up when you click on the browse icon (...) next to the Name box on the Hatch and Gradient palette or next to the Pattern Name box on the Properties palette.
You can operate the Hatch command exclusively from the command line by typing -Hatch. The P option (properties) allows you to specify which hatch pattern to use. And you can select the active hatch pattern by typing HPNAME on the command line or by editing that variable in the Settings palette.
I use a custom command, H, that hatches by picking points, then prompts for selection of a hatch entity to copy properties from, moves the new hatch entity to the back, and exits with the new hatch entity selected and highlighted so that I can alter the hatch pattern or scale using the Properties palette:
(defun c:H () (command "-Hatch") (while (> (getvar "cmdactive") 0) (command pause)) (sssetfirst nil (ssget "L")) (setq ss1 (ssget)) (if ss1 (setq ent1 (entsel "Select Object to clone from..."))) (if ent1 (command "Matchprop" ent1 ss1 "")) (sssetfirst nil (ssget "P")) (setq ss1 (ssget)) (command "Draworder" ss1 "B" "" "") (sssetfirst nil (ssget "P")) )
0 -
@Anthony Apostolaros:
Your use of the word 'palette' is confusing. None of the GUI elements you refer to are 'officially' called palettes.@Trev:
The default installation has a hatch Tool Palette. Have you tried working with that?0 -
@Anthony Apostolaros Thanks for this, i've not really gotten into lisp before, but i will be having a careful at your script to try and figure it out, as it sounds very useful. Thanks for sharing.
Also, prefixing the command with a hyphen is a useful trick to know with regards to macros and scripting.@Roy Klein Gebbinck Opps! How embarrassing. This is exactly what i was referring to. I'm certain that i tried to look for a default hatch palette before making this post - no idea how i missed it! Anyway, when i opened the programme just now it was there, so that's all good. Thanks.
0 -
Sorry, Roy. That was sloppy. I usually try to use the assigned names of everything. I see from the Help screens that it's actually Properties panel, and Hatch and Gradient dialog, and maybe what I was calling boxes are actually called fields, though I couldn't confirm that. But I think Hatch Pattern Palette is an appropriate term, in that it calls itself that, though the Help screen calls it the Hatch Pattern Palette dialog box.
0 -
@Anthony Apostolaros: You are right. Thank you for correcting my statement.
0