exploding unequal scaled blocks

exploding unequal scaled blocks

Anonymous
Not applicable
311 Views
4 Replies
Message 1 of 5

exploding unequal scaled blocks

Anonymous
Not applicable
I needed to explode some drawing blocks so I wrote some code to check for unequal scale. if blkRef.XScaleFactor <> blkRef.YScaleFactor then.... I got many false positives due to decimal precision yet AutoCAD 2000 didn't have any trouble exploding them. Is there some fuzz factor AutoCAD uses to compare scale factor and issue an alert? thanks LJB
0 Likes
312 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hi ljb Because of a (reported) bug in A2k4/A2k5, explode method will fail on NUS blocks. No limitations in A2k, A2ki and A2k2. Sorry, you've to use SendCommand and the whole rubbish around and hit A'desk in the bottom...>8-( Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hi ljb Sorry, misread your post: [code] Public Function MeEqual(Value1 As Double, Value2 As Double, FuzVal As Double) _ As Boolean MeEqual = Abs(Value1 - Value2) <= FuzVal End Function [/code] Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
0 Likes
Message 4 of 5

Anonymous
Not applicable
"Jürg Menzi" wrote in message news:42022A26.9D99A169@menziengineering.ch... > Hi ljb > > Sorry, misread your post: > [code] > Public Function MeEqual(Value1 As Double, Value2 As Double, FuzVal As Double) _ > As Boolean > > MeEqual = Abs(Value1 - Value2) <= FuzVal > > End Function > [/code] > > Cheers > -- > Juerg Menzi > MENZI ENGINEERING GmbH, Switzerland > http://www.menziengineering.ch You had me puzzled at first! I wonder if the following might be safer since either one could be negative? Abs(Abs(Value1) - Abs(Value2)) Then again the same value very close to 0 when loosing precision might never change its sign. thanks
0 Likes
Message 5 of 5

Anonymous
Not applicable
Welcome...¦-) Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
0 Likes