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

lisp modification help (automatic attribute selection)

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
vahe.holtian
344 Views, 3 Replies

lisp modification help (automatic attribute selection)

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?

 

 

 

 

 

 

 

 

3 REPLIES 3
Message 2 of 4
pbejse
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))
					 )

 

 

 

 

Message 3 of 4
vahe.holtian
in reply to: pbejse

thank you!! Smiley Very Happy

Message 4 of 4
pbejse
in reply to: vahe.holtian


@vahe.holtian wrote:

thank you!! Smiley Very Happy


You are welcome vahe.holtian.keep on coding.

 

Cheers

 

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost