เราสามารถทำ piping ga โดยไม่ต้อง install AUtoplant ก็ได้...ลงแค่ Object enable (free ware)
โดยเราใช้Autolisp เรียก เอาค่า entity ออกมาใช้ได้ และถ้าเราทำ Text เป็นแบบ Attribute เราก็จะสามารถใช้ function
Datalink ของ Acad ทำให้เราทราบได้ว่า...drawing ไหน ประกอบด้วย support ตัวไหน piping line ไหน instrument tag Equipment tag เบอร์ไหน...
โดยใช้เวลา ต่อ แบบ ประมาณ 1 นาที....ไม่ต้องมานั่งเช็ค manual ....ผมเคยทดสอบ แบบ ประมาณ 30 แผ่น....ใช้เวลาประมาณ 10 นาที...ได้ excel file
ทำให้ง่าย ต่อการหา ว่า Tag ต่างๆ ที่ต้องการหาอยู่ drawing no ไหน
เพื่อน ลอง ศึกษาเพิ่มจาก ไฟล์ที่แนบมาด้วย เป็นการ หาค่า BOP
1 xref file ที่จะทำ GA เข้ามา
2. Vclip ตัดค่า elevation ที่ต้องการ
3.rename ไฟล์ bop_ver.dwg_1--> bop_ver.dwg ---> เก็บไว้ที่ drive c:
l
(DEFUN C:AP_bop (/ s pcl ent pr cbop bop p1)
(command "mspace")
(setq s nil)
(while (not s)
(SETQ s (nentsel "\nSelect Pipe to callout BOP. :"))
)
(setvar "cmdecho" 0)
(SETQ ent (ENTGET (car s)))
(setq pcl (last (assoc 10 ent)))
(setq pr (cdr (assoc 40 ent)))
(setq cbop (- pcl pr))
(setq cbop (rtos cbop 4 4))
(setq bop (strcat "BOP. EL. (+) " cbop))
(command "pspace")
(SETVAR "ATTREQ" 1)
(SETVAR "ATTDIA" 0)
(setq p1 (getpoint "\nPick insert callout point:"))
(COMMAND "-INSERT" "c:/BOP_VER" p1 "1" "1" "0" bop )
(princ)
)
;Re-written clip funciton that looks remarkably like the one passed around a few years ago (Cadalyst, I think???)
;I added a few tricks for Version 2000 compatability (View specific UCS)
(defun c:Vclip (/ Pt1 Pt2 Pt3 Depth UCS CVPort)
; Gather the two points
(setq CVPort (getvar "CVPort")
pt1 (PickVPt nil "\nPick Front point: ");Camera
pt2 (PickVPt pt1 "\nPick The Back point: ");Target
Depth (distance Pt1 Pt2)
pt3 (getpoint "\nSelect a point in viewport to place the view: ")
)
; If the destination view has a UCS active set it to World
(command "._UCS" "_World"
"._Dview" "" "_Points" pt2 pt1 "_Clip" "_Back" 0.0 "_Clip" "_Front" Depth ""
; If a user coordinate was active lets put it back
"._UCS" "_View"
"._Zoom" "_Extents")
(setvar "cvport" cvport)
(princ)
)
;Prompts for a point and returns the world coordinate
(defun PickVPt (Basept Prmpt / pt ucs)
(if basept
(setq pt (getpoint (trans basept 0 1) Prmpt))
(setq pt (getpoint Prmpt))
)
(if pt
(if (setq UCS (isUCS?))
(setq pt (trans pt 1 0))
)
)
pt
)
;
(Defun IsUCS? ()
(or (> (distance (getvar "UCSXdir") '(1 0 0)) 0.01)
(> (distance (getvar "UCSYdir") '(0 1 0)) 0.01)
)
)

|