can somone help?

Discussion in 'AutoCAD' started by driver, Dec 3, 2004.

  1. driver

    driver Guest

    This routine used to work fine in R14, but in 2000 or 2005 it doesn't work. The routine just goes by the scale command, it actually igores it. It used to work fine on 14, but I don't seem to find the fix for it.

    (if pname
    (progn
    (setq set1 (ssadd))
    (setq last1 (entlast))
    (command "measure" (list pname midpt) "b" "flex" "y" 2)
    (while (entnext last1)
    (setq last1 (entnext last1))
    (ssadd last1 set1)
    )
    (if (setq count (sslength set1))
    (progn
    (while (> count 0)
    (setq names (ssname set1 (1- count)))
    (setq elist (entget names))
    (setq spt (cdr (assoc 10 elist)))
    (if (equal (cdr (assoc 2 elist)) "FLEX")
    (command "scale" g (entget names) "" spt s1)
    )
    (setq count (1- count))
    )
    )
    )
    (command "erase" pname "")
    (setq set1 nil)
    )
     
    driver, Dec 3, 2004
    #1
  2. driver

    BillZ Guest

    The routine just goes by the scale command, it actually igores it<<<

    The scale command is looking for enames or a selection set.

    I don't see where g has any value and (entget names) would return the association list of the selection set item.

    Are you sure this used to work in R14?

    Bill
     
    BillZ, Dec 3, 2004
    #2
  3. driver

    ECCAD Guest

    I don't see variables 'g' or 's1' being set to any value.
    Looks like this routine has been modified from original ?
    Or, maybe there is a 'chunk' of code we don't see.

    Bob
     
    ECCAD, Dec 3, 2004
    #3
  4. driver

    Jay Guest

    For one thing, you are redefining the built-in symbol trans. Rename your function.
     
    Jay, Jan 10, 2005
    #4
  5. driver

    Jay Guest

    I'd like to try to help. The code fragment you first posted is different from the code in the file you attached. Are
    you revising it?
     
    Jay, Jan 13, 2005
    #5
  6. driver

    driver Guest

    No i'm not revising it the first post was a piece of the full routine. the attached lisp file contains the whole routine. Bob recommended changing the insert comand, but it didn't work , I attached a sampew of what it used to do, and what it does now
    Thanks
     
    driver, Jan 18, 2005
    #6
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.