Select all dimensions not 1/128 precision?

Select all dimensions not 1/128 precision?

DC-MWA
Collaborator Collaborator
414 Views
3 Replies
Message 1 of 4

Select all dimensions not 1/128 precision?

DC-MWA
Collaborator
Collaborator

Hello,

I'm looking for an easy way to select all dimensions in a drawing that are not 1/128 precision.

I'm hoping someone has done this and can point me in the right direction.

 

Ultimately I would like to change the color of all non 1/128th dimensions to yellow.

Thank you in advance for any assistance received.

0 Likes
Accepted solutions (1)
415 Views
3 Replies
Replies (3)
Message 2 of 4

hak_vz
Advisor
Advisor
Accepted solution

@DC-MWA 

 

Maybe something like this?

(defun c:foo ( / ss i eo)
	(setq ss (ssget "X" '((0 . "DIMENSION"))) i -1)
	(cond 
		((and ss)
			(while (< (setq i (1+ i))(sslength ss))
				(setq eo (vlax-ename->vla-object (ssname ss i)))
				(if(vlax-property-available-p eo 'PrimaryUnitsPrecision)
					(if (/= (vlax-get eo 'PrimaryUnitsPrecision) 7)
						(vlax-put eo 'Color 2)
					)
				)	
			)
		)
	)
	(princ)
)

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 3 of 4

DC-MWA
Collaborator
Collaborator

This is perfect! Thank you very much!!!!

Message 4 of 4

hak_vz
Advisor
Advisor

@DC-MWA I'm glad it works for you. I work with SI units, so setting proper combination of architectural units in Acad was bigger problem for me than finishing the code.

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes