ZIGZAG Hatch error

ZIGZAG Hatch error

odurier
Enthusiast Enthusiast
1,202 Views
3 Replies
Message 1 of 4

ZIGZAG Hatch error

odurier
Enthusiast
Enthusiast

Hello,

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 ?

 

Thanks

0 Likes
1,203 Views
3 Replies
Replies (3)
Message 2 of 4

Hallex
Advisor
Advisor
Wrap this code in Try..Catch, my guess is you've set
big pattern scale value, so try to play with other sizes
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 3 of 4

odurier
Enthusiast
Enthusiast

hi,

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

0 Likes
Message 4 of 4

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes