Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running Ctext on specific item cid

1 REPLY 1
Reply
Message 1 of 2
Anonymous
733 Views, 1 Reply

Running Ctext on specific item cid

Hi Everyone,

 

I am trying to get this code to work....

 

--------------------------------------------------------------------------

 

(defun c:etag()

 

(setq ss (ssget))

(setvar "pickfirst" 1)


(sssetfirst nil ss)

 

(executescript "Elbow Tagger.cod")

 

if item.cid = 4, 61 then
(addctext "AMCI-Full-Elbow-Tag")
end if

 

end select)

 

------------------------------------------------------------------

 

Basically it runs a script and then a ctext. The thing is, I only want it to run ctext on items with cid# of 4 and 61. I've tried incorporating the VB code which should achieve something like this but it didn't work. For the record, I am more familiar with VD then Lisp. I wish that I could have my script handle the ctext part but people all tell me that scripts can't run ctext 😞

 

Currently, this lisp code will add the ctext to all parts, not just the ones with cid# of 4 or 61.

 

Can anyone help me out?

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

a little late... but I would recommend watching this youtube video. It clearly shows how to filter certain CID's.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost