Hi
i was wondering if there could be lisp or macro to change all layers colors of xref in viewport to only one color using property override
any help is grealty apprciated
|
Hi
i was wondering if there could be lisp or macro to change all layers colors of xref in viewport to only one color using property override
any help is grealty apprciated
This is totally stumping me ... according to help this should be available through any one of the following DXF codes of a VIEWPORT entity: 91, 335, 343 or 344. After setting a layer with a colour override inside a viewport, that VIEWPORT entity still doesn't have any of these DXF codes.
So I checked the ActiveX - there's no mention of Layer Property Overrides in the Help at all. So I used the VLIDE inspector on a (vlax-ename->vla-object ...) this provided only a Has Layer Overrides property of VLAX:TRUE. So it's there somewhere .... but how do you get / set it? Must be a method & not a property - so inspection won't show it.
Next I got hold of the LAYER in question ... (entget (tblobjname "LAYER" "...")). Finally there's a 360 code in the "{ACAD_XDICTIONARY" group, pointing to a "ADSK_XREC_LAYER_COLOR_OVR" dictionary object. The XRECORD object under this (DXF code 360 again) has a pointer to the LAYER (code 335) followed by a 420 code with (what looks like) the colour's RGB value as an integer. There's no pointer whatsoever to the VIEWPORT which actually shows this override. What can one do?
thanks alot for ur answer and sorry for being late replying , i dont know much abt lisp but im good in macros , i thought i could make macro to set my viewport active then import and restore layerstate that changes all layers colors to the required one , unfortunately it didnt work , i used ( -la "a" "r" ) but it has no effect on vp colors , i checked the help and found function called "layerstate-restore" but couldnt figure it out how it use it in lisp
hope u or anybody can help me in this