تخطى إلى المحتوى

ليسب لرسم الفتحات على المساقط

24 جانفي 2018

الليسب المرفق يرسم الفتحات على المساقط و يضعها على مستويات خاصة بقسم الانشائي

 

–       خط الفتحة على المستوى S-OPEN

–       و يرسم خطي التقاطع على المستوى S-OPEN-PATT

قم بنسخ الليسب في ملف نصي ثم قم بتغير الامتداد  من TXT الى LSP

 

;|———— Opening Lines ——————-
q_|_|| _\|| q_|| _\|

To add rectangle and crossing lines to show
opening

Layers for opening and crossing line can
be changed

————————————————
Author: Hassan M. Asous, 2013
ALL RIGHT RESERVED TO ALL

Contact: HasanCAD @ TheSwamp.org,
asos2000 @ CADTutor.net
HasanCAD@gmail.com
————————————————
Version: 1 2014 05 18
________________________________________________
|;
; q_|_|| _\|| q_|| _\| ;
; Mainroutine Start ;

(defun c:OpeningLines () (c:opl))
(defun c:opl ( / clyr l o ortmd p1 p2 p3 p4 )

(setq O “S-OPEN”) ; Oening Line layer
(setq L “S-OPEN-PATT”) ; Oening cross Lines layer

(makelay O 3 “Continuous”)
(makelay L 1 “Continuous”)
(while
(if (and (setq p1 (getpoint “\n click first corner”))
(setq ortmd (getvar “orthomode”))
(setvar “orthomode” 0)
(setq p2 (getcorner p1 “\n click second corner”))
(setvar “orthomode” ortmd)
(setq p3 (list (car p2) (cadr p1)))
(setq p4 (list (car p1) (cadr p2)))
)
(progn
(setq clyr (getvar “clayer”))
(setvar “clayer” “S-OPEN”)
(command “rectang” p1 p2 “”)

(setvar “clayer” “S-OPEN-PATT”)
(command “line” p1 p2 “”) (command “line” p3 p4 “”)
(setvar “clayer” clyr)))))

(princ)
(princ “\n q_|_|| _\\|| q_|| _\\| “)
(princ “\n Type OPL to invoke the lisp “)

; q_|_|| _\|| q_|| _\| ;
; Mainroutine End ;
; q_|_|| _\|| q_|| _\| ;
; Subroutine Start ;

(defun makelay (LName LColor LType)
; CAB
(vl-load-com)
(if (not (tblsearch “LTYPE” LType))
(vla-load
(vla-get-Linetypes
(vla-get-ActiveDocument
(vlax-get-acad-object))) LType “acadiso.lin”))
(if (not(tblsearch “LAYER” LName))
(entmake (list
‘(0 . “LAYER”)
‘(100 . “AcDbSymbolTableRecord”)
‘(100 . “AcDbLayerTableRecord”)
(cons 2 LName) ;layer name
(cons 6 (if (and ltype(tblobjname “ltype” ltype)) ltype “Continuous”)) ;linetype
(cons 62 LColor) ;layer color
‘(70 . 0) ; on, unlocked, thawed
) ) ))

; q_|_|| _\|| q_|| _\| ;
; Subroutine End ;

 

From → Lisp

اكتب تعليقُا

أضف تعليق