;Shusei Hayashi
;OffshoreCad&Management Inc.
;10F Jaka Bldg., 6780 Ayala Ave.,
;Makati, Philippines
;http://www.offshorecad.com.ph/
;http://www.offshore-management.com.ph/
; Slightly modified to work with AutoCAD 2014 & 2015
; Greg Battin www.autocadtips.wordpress.com
;
(defun c:JDIMS
( / Flag ObjName1 ObjName2 Ang Ang2 Pt1 Pt2 Pt3 Pt4
) (princ "\n convert two dimensions to total Dimension on the same position") (princ "\n **********************************") (SD1028)
(get_layer<ype&color)
(RegistryRead_1001)
)
)
(setq theStyle
(SD3511
3 ObjName1
)) )
)
(princ "\n two dimensions should have same angle") )
)
;
;
;
)
(setq Ang2
(+ Ang
(* -0.5 pi
))) ;?C[
;
;
;
;
;
;
; (checkcircle Pt1 1.0 "A21")
; (checkcircle Pt2 1.0 "A31")
; (checkcircle Pt3 1.0 "A51")
; (setq Pt4 (polar Pt3 Ang (* LegLen Scale)))
; (checkcircle Pt4 1.0 "A21")
; Pt4 (trans Pt4 0 1)
)
(setq Ang2
(- Ang2 UAng
)) (command "._dimstyle" "RE" theStyle
) (command "dimrotated" (* 180 (/ Ang2 pi
)) Pt1 Pt2 Pt3
)
(SD2056)
)
;-----------------------------------------
(defun RegistryRead_1001
() (setq Path1001
"HKEY_CURRENT_USER\\Software\\SpeedDraftLT\\SD_1001") (if (vl
-registry
-read Path1001
"LegLen" ) )
)
(if (and (vl
-registry
-read Path1001
"Lay1" )(member (vl
-registry
-read Path1001
"Lay1") Laylist1
)) (setq Lay1
(vl
-registry
-read Path1001
"Lay1")) )
)
(if (and (vl
-registry
-read Path1001
"LT1" )(member (vl
-registry
-read Path1001
"LT1") Laylist3
)) (setq LT1
(vl
-registry
-read Path1001
"LT1")) )
)
(if (and (vl
-registry
-read Path1001
"Col1" )(member (vl
-registry
-read Path1001
"Col1") Laylist2
)) (setq Col1
(vl
-registry
-read Path1001
"Col1")) )
)
)
;----------------
(setq Path_Lang
"HKEY_CURRENT_USER\\Software\\SpeedDraftLT") ; (if (vl-registry-read Path_Lang "SD_Language" )
; (setq SD:Lang (vl-registry-read Path_Lang "SD_Language" ))
; (progn (setq SD:Lang "J")
; (vl-registry-write Path_Lang "SD_Language" "J")
; )
; )
)
;********************************
(setvar "CeLWeight" OldCeLWeight
) (command "-dimstyle" "Restore" OldDStyle
) )
(princ "\n (C)OffshoreCad&Management") )
;********************************
(defun get_layer
<ype
&color
() Laylist2
(list "ByLayer" "Red" "Yellow" "Green" "Cyan" "Blue" "Magenta" "B/W") )
Laylist1
(append Laylist1 lay1
) Laylist3
(append Laylist3 lay3
) )
)
Laylist3
(append Laylist3 lay3
) )
)
(setq Laylist1
(RemoveOverlap Laylist1
) Laylist2 (RemoveOverlap Laylist2)
Laylist3 (RemoveOverlap Laylist3))
)
;************************
(defun RemoveOverlap
( List2
/ List1
) )
List1
)
;;;---------Rotate----------------------------
(defun SD8446
( PointA PointB Ang
/ XA YA XB YB PointC
)
)
PointC
)
;****************************************************
(defun SD1862
(OldPt Ang
/ NewCs
) (setq NewCs
(SD8446 '
(1 0) '
(0 0) Ang
)) NewPt
)
;**********************
)
)
;********************************
(SD2056)
(princ "\n Error in SpeedDraftLT") )
(princ "\n Command Name: JDIMS")