Inherit hatch color to use in a new one

aridzv
edited September 2022 in LISP Codes
Hi.
I've found this closed topic about how to Inherit hatch pattern from a source hatch object and apply it to new hatches.
those lisps (there are 2 in that topic) works fine.
I'm looking for a way to also apply the source hatch color to the new hatch objocts.
I've tried to do so but failed.
any help will be appricated.
many thanks,
aridzv.

Comments

  • Here's a custom version of the command-line version of the Hatch command.
    It automatically prompts for an existing hatch entity to inherit properties from.

    It also uses the DrawOrder command to move the new hatch entity to the back.
    If you don't want that part, just delete (or put a semi-colon before) the next-to-last line.
  • aridzv
    edited September 2022
    Hi Anthony and thanks for the reply!!
    it is workig perfect, but when I pick more then one boundery as a target for new hatch it is using the clone hatch pattern only for the last boundery and the rest get ANSI31 pattern.
    is it possible to assign the clone hatch pattern to all selected bounderies?
    DrawOrder command to move the new hatch entity to the back is acctually very helpfull because in my case I do need to send those hatches to the back,
    so thanks for that!!

    thanks,
    aridzv.
  • Anthony Apostolaros
    edited September 2022
    I'm sorry, aridzv, but I don't understand. Maybe it's because I'm using an older version of Bricscad.

    In my v17, I can only make one new hatch entity each time I use the HMB command (or the built-in Hatch command). No matter how many different internal points I click in, or how many boundary entities I select, I get one hatch entity filling all those spaces. And that one new entity is given all the properties (not just the color) of the old hatch entity that I select afterward.

    I usually make several new hatch entities all at once, with each hatch entity filling just one space, but I use the HMB command for each one. I hit the Space bar to repeat the HMB command, then click in the internal point, then Space bar again, and then pick an old hatch to inherit properties from.
  • aridzv
    edited September 2022
    Hi Anthony.
    what I ment is that I was looking for this workflow:

    1. have a number of closed bounderies without hatch and an hatch pattern I need to apply to them.
    2. run the command.
    3. prompt the user to select the hatch pattern to copy/inherit.
    4. click inside the bounderies one by one and create the hatch.
    5. exit the command.

    take a look in this link.

    regards,
    aridzv.
  • Anthony Apostolaros
    edited September 2022
    aridzv said:

    1. have a number of closed bounderies without hatch and an hatch pattern I need to apply to them.
    2. run the command.
    3. prompt the user to select the hatch pattern to copy/inherit.
    4. click inside the bounderies one by one and create the hatch.
    5. exit the command.

    So you exit the command (step 5) after creating each hatch (step 4)? If so, that's the same as in v17.

    It sounds like you want to select the color and hatch pattern before creating the hatch entities, so that you can create many hatches with the same color and pattern and not have to select the source object each time. I think that would be easy to do with lisp, using the VBA properties Color and PatternName (or the DXF group codes 62 and 2) of the source object. Just get them from the source object, and then supply them to the -Color command and to the Properties option of the -Hatch command. But it's not something I would have any use for, so I haven't done it.

    I do all my hatching at once, using a variety of hatch patterns. I want each hatch's layer, color, lineweight, linetype, linetype scale, and hatch scale to be inherited along with the hatch pattern, and I want all the hatches behind the boundary lines in draworder. The HMB command does all that for me with just two clicks for each hatch entity (1 = inside the hatch area, 2 = on the source hatch), and two presses of the space bar (1 = repeat last command, 2 = end selection of hatch areas).
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!