Request help Ordinatedim Straighten

Request help Ordinatedim Straighten

Anonymous
Not applicable
895 Views
4 Replies
Message 1 of 5

Request help Ordinatedim Straighten

Anonymous
Not applicable

Request help 
After selection  Ordinatedim  Straighten
Same as the picture
Thank

Snap1.png

0 Likes
Accepted solutions (1)
896 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

@Anonymous Could you be more specific in your question? I didn't understand Robot Frustrated Robot Frustrated

0 Likes
Message 3 of 5

dbhunia
Advisor
Advisor
Accepted solution

For only....

 


@Anonymous wrote:

Request help 
After selection  Ordinatedim  Straighten
Same as the picture
Thank

Snap1.png


 

Try this......

 

(defun C:AOD ( / N_IP_Text IP_Line IP_Text Dir);;put temp variables here
(command "CMDECHO" 0)
(princ "\nSelect Ordinate dimension to align: ")
(Setq SS (ssget '((0 . "DIMENSION"))))
(setq OSM (getvar "OSMODE"))
(setvar "osmode" 0)
(repeat (setq N (sslength SS))
	(setq Data (ssname SS (setq N (- N 1))))
	(setq EntityData (entget Data))
	(setq Dir (cdr (assoc 70 (entget Data))))
	(setq IP_Line (cdr (assoc 13 EntityData)))
	(setq IP_Text (cdr (assoc 14 EntityData)))
	(if (= Dir 38)
		(setq N_IP_Text (list (nth 0 IP_Text) (nth 1 IP_Line) 0.0))
		(setq N_IP_Text (list (nth 0 IP_Line) (nth 1 IP_Text) 0.0))
	)
	(entmod (subst (cons 14 N_IP_Text) (assoc 14 EntityData) EntityData))
)
(setvar "osmode" OSM)
(command "CMDECHO" 1)
(princ)
)

Tested in AutoCAD 2007 hopefully work in upper version.....


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 4 of 5

Anonymous
Not applicable

Thank you very good  !!

0 Likes
Message 5 of 5

dlanorh
Advisor
Advisor
(setq ss (ssget "_x" '((0 . "DIMENSION") (-4 . "<OR") (70 . 38) (70 . 102)(-4 . "OR>"))))

Will get you a selection set of all ordinate dims where the text is still associated with the line.

 

(assoc 14 ...)

For what it's worth, this is the end of the leader line not the text ip.

I am not one of the robots you're looking for

0 Likes