Need to select both objects

Discussion in 'AutoCAD' started by Big 'D', Sep 20, 2004.

  1. Big 'D'

    Big 'D' Guest

    I have a lisp that highlights text associated with symbols that have associated xdata. I believe the solution is simple. I am just not savvy enough to figure it out. The attached zip file is the routine. With the code as is, the symbol and the text associated with the symbol labeled "zn" is highlighted and If I remove the code from (defun findsymdatatext (ss mode) to the end, the xdata tagged " refdes_handle" is highlighted. What can I do to this code to highlight both, zn and refdes_handle? Please help!
    Thanks in advance,
    D
     
    Big 'D', Sep 20, 2004
    #1
  2. Big 'D'

    BillZ Guest

    Well one thing that will not work is that you have 2 subrs (findsymdatatext) with same name. Only the last one defined will have any value.
    I'm not sure what the subr getsymxdata returns but it seems to me that this should work using one subr called findsymdatatext.

    (defun findsymdatatext (ss mode)

    (setq count 0)

    (repeat (sslength ss)

    (getsymxdata (ssname ss count))

    (if zn_handle

    (redraw (handent zn_handle) mode)

    )
    (if refdes_handle

    (redraw (handent refdes_handle) mode)

    )

    (setq count (1+ count))

    )

    )

    HTH

    Bill
     
    BillZ, Sep 20, 2004
    #2
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.