Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Contributor
vahe.holtian
Posts: 22
Registered: ‎10-30-2012
Message 1 of 4 (173 Views)
Accepted Solution

lisp modification help (automatic attribute selection)

173 Views, 3 Replies
11-30-2012 01:51 AM

hey

 

i have a very useful lisp routine that helps me increment the numbers in the selected tag.

 

i just want to make it choose the tag ("BAR_MARK") automatically..

(meaning that clicking on the block wil do the work and its not necessary to click on the tag)

 

can anyone help?

 

 

 

 

 

 

 

 

*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 2 of 4 (167 Views)

Re: lisp modification help (automatic attribute selection)

11-30-2012 03:06 AM in reply to: vahe.holtian

quick mode on the code 

 

here's a snippet, [refer to the attached file]

 

(while (and (/= fin 1) (not (or (= id "Pause") (= id "TEXT") (= id "MTEXT") Tag_found )))

 

 

((/= obj nil) (setq objid (entget (car obj)))
					 (setq id (cdr (assoc 0 objid)))
					 (setq Tag_found 
					 (if (and (= id "INSERT")
						  (= (cdr (assoc 66 objid)) 1)
						  (setq obj (vl-remove-if-not
							  '(lambda (j)
							     (eq (vla-get-tagstring j) "BAR_MARK")
							   )
							  (vlax-invoke (setq vl_obj (vlax-ename->vla-object (car obj))) 'Getattributes)
							))
						  (setq obj (list (vlax-vla-object->ename (car obj)))))
					   	  T nil))
					 )

 

 

 

 

Contributor
vahe.holtian
Posts: 22
Registered: ‎10-30-2012
Message 3 of 4 (151 Views)

Re: lisp modification help (automatic attribute selection)

11-30-2012 10:45 PM in reply to: pbejse

thank you!! :smileyvery-happy:

*Expert Elite*
pbejse
Posts: 2,406
Registered: ‎11-24-2009
Message 4 of 4 (149 Views)

Re: lisp modification help (automatic attribute selection)

11-30-2012 11:02 PM in reply to: vahe.holtian

vahe.holtian wrote:

thank you!! :smileyvery-happy:


You are welcome vahe.holtian.keep on coding.

 

Cheers

 

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community