- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys I have been cobbling together a program to set lineweight to colors automatically so I can update hundreds of prototypes.
What I have so far is working fine for the lineweight but I was wondering if it is possible to set VP lineweights at the same time using a similar method
(defun c:assignlineweights ( / layers_col col)
(SETVAR "lwunits" 1 )
(vl-load-com)
(or *acaddoc* (setq *acaddoc* (vla-get-activedocument (vlax-get-acad-object))))
(setq layers_col (vla-get-layers *acaddoc*))
(vlax-for item layers_col
(setq col (vlax-get-property item 'color))
(cond ((= col 1)(vlax-put-property item 'LineWeight acLnWt025))
((= col 2)(vlax-put-property item 'LineWeight acLnWt120))
((= col 3)(vlax-put-property item 'LineWeight acLnWt035));copy down and change to suit
)
)
(SETVAR "lwunits" 0 )
(PRINC "Assign Lineweights to Layers loaded. Type assignlineweights to run.")
(princ)
)
I can't seem to find a variable or property like acLnWt but for VP Lineweight
Thanks to he guys whose code I poached already
Any help would be greatly appriciated
Eamon
Solved! Go to Solution.