aecobjexplode - command line troubles

Discussion in 'AutoCAD' started by Daron Denton, Jan 15, 2004.

  1. Daron Denton

    Daron Denton Guest

    i'm trying to use aecobjexplode in lisp. it doesn't like the 'if' statement
    testing for the presence of more than one viewport, to satisfy the view
    option.

    in a drawing with a paperspace viewport, the following fails...
    (progn
    (command ".-aecobjexplode" "y" )
    (if (and
    (ssget "x" (list'(0 . "VIEWPORT")))
    (> (sslength (ssget "x" (list'(0 . "VIEWPORT")))) 1)
    )
    (command "c") ;..view
    )
    ) ;... returns "Invalid option keyword."


    but this works...
    (progn
    (command ".-aecobjexplode" "y" )
    (command "c") ;..view
    )

    could someone please verify?
    thank you
    daron
     
    Daron Denton, Jan 15, 2004
    #1
  2. Daron,

    don't have adt installed, but have you try to implement the use of
    cmdactive?

    (while (= 0 (getvar "cmdactive")) (command "c"))

    hth.

    --
    Get your free DraftTeam version 1.4 copy, just download it from here
    http://www.draftteam.com/draftteam/draftteam.zip or sent your request to


    Offer ends on Friday, January 23 of 2004
     
    Luis Esquivel, Jan 15, 2004
    #2
  3. --
    Get your free DraftTeam version 1.4 copy, just download it from here
    http://www.draftteam.com/draftteam/draftteam.zip or sent your request to


    Offer ends on Friday, January 23 of 2004
    that should be:

    (while (= 1 (getvar "cmdactive")) (command "c"))
     
    Luis Esquivel, Jan 15, 2004
    #3
  4. Daron Denton

    Daron Denton Guest

    there are 5 to 8 more varying responses after "c" also depending on the
    presence or absence of other objects, so that won't work in this case.

    thank you though. :eek:)
    daron
     
    Daron Denton, Jan 15, 2004
    #4
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.