- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lisp that changes properties of REVIT lines to CAD lines. I previously got help on this LISP but noticed this problems on all exported drawings.
Somehow exported lines keep the REVIT cache. I want to rename all BAD lines so that i can reload them later down the LISP.
this is what i want to add to the lisp:
(COMMAND "-RENAME" "LT" "HIDDEN" "HIDDEN-BAD" "")
(COMMAND "-RENAME" "LT" "HIDDEN2" "HIDDEN2-BAD" "")
(COMMAND "-RENAME" "LT" "CENTER" "CENTER-BAD" "")
(COMMAND "-RENAME" "LT" "CENTER2" "CENTER2-BAD" "")
(COMMAND "-RENAME" "LT" "DASHED" "DASED-BAD" "")
(COMMAND "-RENAME" "LT" "DASHED2" "DASED2-BAD" "")
This is my lisp:
(defun c:TESTlt (/ adoc linetypes ltyps ssobj)
(or adoc (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
(setq linetypes (vla-get-linetypes adoc))
(vlax-for ltyp (vla-get-linetypes adoc) (setq ltyps (cons (vla-get-name ltyp) ltyps)))
(defun put_linetype (obj linetype linefile)
(if (vl-position linetype ltyps)
(vla-put-linetype obj linetype)
(progn (vla-load linetypes linetype linefile)
(setq ltyps (cons linetype ltyps))
(vla-put-linetype lay linetype))))
(vlax-for lay (vla-get-layers adoc) (demoln lay))
(ssget "_x")
(setq ssobj (vla-get-activeselectionset adoc))
(vlax-for lay ssobj
(if (vlax-property-available-p lay 'linetype)
(demoln lay)))
(princ))
(defun demoln (x / ltyp)
(cond ((wcmatch (setq ltyp (vla-get-linetype x)) "Dash,Dash 1_16_,Dash Dot 3_16_,Dash 1_32_,Dash 1_64_,Long dash,Hidden 1_8_,Hidden 1_16_,Overhead 1_16_,HIDDEN-BAD,HIDDEN2-BAD")
(put_linetype x "HIDDEN2" "acadiso.lin"))
((wcmatch (setq ltyp (vla-get-linetype x)) "IMPORT-INVISIBLE")
(put_linetype x "dot2" "acadiso.lin"))
((wcmatch ltyp "Center 1_8_;Grid 1_2_,Grid Line 1_2_,IMPORT-CHAINTHIN0,IMPORT-CENTER _10_,IMPORT-CENTER2,IMPORT-INVISIBLE,IMPORT-CENTER2,CENTER-BAD,CENTER2-BAD,,DASHED-BAD,DASHED2-BAD")
(put_linetype x "Center2" "acadiso.lin"))
(t ())))
Solved! Go to Solution.