Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi , please help me . I need to rotate, by lisp, angular dimension as follow find attached a sample dwg
Solved! Go to Solution.
Hi , please help me . I need to rotate, by lisp, angular dimension as follow find attached a sample dwg
Solved! Go to Solution.
@devitg hi,
check this, i not fully sure but it look like the mtext rotation is not part of the dimension style.
works?
Moshe
; dimenstion text rotate
(defun c:dimtxtrot (/ collectPoints ; local function
ss ename AcDbDim pts int)
(defun collectPoints ()
(mapcar
(function
(lambda (prop)
(vlax-safearray->list (vlax-variant-value (vlax-get-property AcDbDim prop)))
)
)
'(textPosition ExtLine1StartPoint ExtLine1EndPoint ExtLine2StartPoint ExtLine2EndPoint)
)
); collectPoints
(if (setq ss (ssget '((0 . "dimension") (100 . "AcDbAngularDimension"))))
(progn
(foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
(setq AcDbDim (vlax-ename->vla-object ename))
(setq pts (collectPoints))
(if (setq int (inters (cadr pts) (caddr pts) (cadddr pts) (last pts)))
(vla-put-textRotation AcDbDim (angle int (car pts)))
)
(vlax-release-object AcDbDim)
); foreach
); progn
); if
(princ)
); c:dimtxtrot