exploding unequal scaled blocks

Discussion in 'AutoCAD' started by ljb, Feb 2, 2005.

  1. ljb

    ljb Guest

    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
     
    ljb, Feb 2, 2005
    #1
  2. ljb

    Jürg Menzi Guest

    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
     
    Jürg Menzi, Feb 2, 2005
    #2
  3. ljb

    Jürg Menzi Guest

    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
    
    Cheers
     
    Jürg Menzi, Feb 3, 2005
    #3
  4. ljb

    ljb Guest

    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
     
    ljb, Feb 3, 2005
    #4
  5. ljb

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Feb 3, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.