Posts: 21
Registered: ‎06-16-2008
Message 1 of 4 (252 Views)

ZIGZAG Hatch error

252 Views, 3 Replies
07-22-2013 05:38 AM


I encounter a problem with the hatch command when I use the pattern 'ZIGZAG'
I tested the code http://adndevblog.typepad.com/autocad/2012/07/hatch-using-the-autocad-net-api.html but when I run it, Autocad stops with an error fatal
Someone would have an idea of the problem ?



*Expert Elite*
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 4 (222 Views)

Re: ZIGZAG Hatch error

07-22-2013 10:25 PM in reply to: odurier
Wrap this code in Try..Catch, my guess is you've set
big pattern scale value, so try to play with other sizes
Posts: 21
Registered: ‎06-16-2008
Message 3 of 4 (210 Views)

Re: ZIGZAG Hatch error

07-23-2013 08:31 AM in reply to: Hallex


if the value has changed is PatternScale I tested with different values but still the same problem 'eInvalidInput'

*Expert Elite*
Posts: 9,213
Registered: ‎06-29-2007
Message 4 of 4 (198 Views)

Re: ZIGZAG Hatch error

07-24-2013 01:01 PM in reply to: odurier



try to move the line with .PatternScale after the line with .SetHatchPattern.


Reason: there was a change between AutoCAD version 2011 and 2012 (maybe between 2010 and 2011, not really sure about that and I have no chance now to look at it) with the hatch .Rotation property, the order of the lines (first set rotation, then set hatchpattern or first set hatchpattern and then set rotation) is relevant to the version of AutoCAD, maybe the same is valid for the pattern scale.


HTH, - alfred -

Ingenieur Studio HOLLAUS ... www.hollaus.at
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.