Vla-explode with NUS block fails - bug in 2k4/5?

Discussion in 'AutoCAD' started by Jürg Menzi, Sep 17, 2004.

  1. Jürg Menzi

    Jürg Menzi Guest

    Hi all

    Has anyone recognized this new 'feature' in 2k4/5?
    There was never a problem in 2k2 with the explode method.
    _$ (vla-Explode (vlax-ename->vla-object (car (entsel))))
    ; Fehler: AutoCAD.Application: Ungültige Eingabe
    (; Error: AutoCAD.Application: Invalid Input)

    Cheers
     
    Jürg Menzi, Sep 17, 2004
    #1
  2. Jürg Menzi

    Jeff Mishler Guest

    Is EXPLMODE sysvar set to 0? Needs to be 1 to explode NUS blocks.....
     
    Jeff Mishler, Sep 17, 2004
    #2
  3. Jürg Menzi

    David Kozina Guest

    NUS?
    Non-uniform scaled?
     
    David Kozina, Sep 17, 2004
    #3
  4. Jürg Menzi

    Jürg Menzi Guest

    Hi Jeff

    EXPLMODE is set to 1...

    Cheers
     
    Jürg Menzi, Sep 18, 2004
    #4
  5. Jürg Menzi

    Jürg Menzi Guest

    Yep..

    Cheers
     
    Jürg Menzi, Sep 18, 2004
    #5
  6. Jürg Menzi

    Doug Broad Guest

    Juerg,
    Thanks for noticing this 'bug'. That really limits the application
    of vla-explode. Back to command methods. ;-(

    Regards,
    Doug
     
    Doug Broad, Sep 18, 2004
    #6
  7. Jürg Menzi

    Jürg Menzi Guest

    Hi Doug
    Unfortunately yes... meanwhile I use this workaround:
    Code:
    (defun MeExplode (Obj / ExpObj ObjLst TmpEnt)
    (setq TmpEnt (entlast)
    ExpObj (vla-Copy Obj)
    )
    (if (vl-cmdf "_.EXPLODE" (vlax-vla-object->ename ExpObj))
    (progn
    (setq TmpEnt (handent (cdr (assoc 5 (entget TmpEnt)))))
    (while (setq TmpEnt (entnext TmpEnt))
    (setq ObjLst (cons (vlax-ename->vla-object TmpEnt) ObjLst))
    )
    )
    (vla-Delete ExpObj)
    )
    (reverse ObjLst)
    )
    
    Cheers
     
    Jürg Menzi, Sep 18, 2004
    #7
  8. Jürg Menzi

    Doug Broad Guest

    Good workaround Juerg. Thanks for posting it.

    Regards,
    Doug


     
    Doug Broad, Sep 18, 2004
    #8
  9. Hi Jürg,

    Do a test of a block made of polylines... and see the difference.... if the
    nus block is exploded.... the polylines turn into lines, but from a uniform
    block they become polylines.



     
    Luis Esquivel, Sep 18, 2004
    #9
  10. nus block is exploded.... the polylines turn into lines, but from a
    uniform
    as what the command is supposed to work... then to me and never had put
    attention to this is also a bug... will try to make a test on 2000i
     
    Luis Esquivel, Sep 18, 2004
    #10
  11. Jürg Menzi

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Sep 19, 2004
    #11
  12. Jürg Menzi

    John Uhden Guest

    Jürg:

    Just watch out using (entlast). If the last object contained sub-objects like
    vertices or attributes, then (entnext) will retrieve them...
    ;;------------------------------------------------------------
    ;; Function to get the absolutely last entity in the database:
    ;; Revised (01-07-03) in case the drawing is empty.
    ;;
    (defun @cv_entlast ( / e elast)
    (setq elast (entlast))
    (while (and elast (setq e (entnext elast)))
    (setq elast e)
    )
    elast
    )




     
    John Uhden, Sep 20, 2004
    #12
  13. Jürg Menzi

    Jürg Menzi Guest

    Hi John
    Yesterday I ran also into this. Together with your function it works well.
    Thank you...¦-)

    Cheers
     
    Jürg Menzi, Sep 20, 2004
    #13
  14. Jürg Menzi

    Jürg Menzi Guest

    Hi Luis
    That's correct. But the explode methode shouldn't fail on NUS blocks.
    This was working in A2k, A2ki and A2k2, but not in A2k4 and A2k5...>8-(

    Cheers
     
    Jürg Menzi, Sep 20, 2004
    #14
  15. Jürg Menzi

    John Uhden Guest

    You're quite welcome. I think I still owe you more than you owe me. ;)
     
    John Uhden, Sep 21, 2004
    #15
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.