mike mcneil Posted December 16, 2008 Share Posted December 16, 2008 On occasion I will override the object creation method (either fill type, line type, color, etc.) in the Attributes Palette when I am creating a viewport frame or polyline, etc. Is there a way via a script to set those properties back to "by class" rather than having to select each property individually in the Attributes Palette. I am not trying to modify an existing object, but I would like to have the default creation method set back to "by class" for every attribute. Thanks for your help. Quote Link to comment
Pat Stanford Posted December 16, 2008 Share Posted December 16, 2008 Take a close look at the Attributes Palette. Every setting there has an option for "By Class". The all have a little black arrow pointing to the upper right in them. Just take the parameter that needs to use the class attributes and set that attribute to the "By Class" option. This works for any object, not just those created with "Class Attributes" turned on at their creation. Quote Link to comment
maarten. Posted December 16, 2008 Share Posted December 16, 2008 Not sure if it's this what you need, but if you use this script, the next (and all folowing) objects will be drawn "by class". I use it quiete a lot because i got many external drawings that where the standard attributes aren't "by class". [font:Courier New]LSByClass; PenColorByClass; LWByClass; FPatByClass; FillColorByClass; OpacityByClass;[/font] Quote Link to comment
mike mcneil Posted December 16, 2008 Author Share Posted December 16, 2008 Thanks Maarten. That was what I was looking for. Quote Link to comment
John Meunier Posted December 16, 2008 Share Posted December 16, 2008 I use this script to set back to class, I have gave it a shortcut (shift command option a) and it sets the object to class or the pallette if nothing is seleted to class defaults. The only thing I would like to see improved in this script is the opacity and arrow to be set to class also. {Developed ?2003 Katerina Panagiotakis} Procedure Classdf; var x,y,xo,yo: Real; h,oh,h0,hp,hx,ha,hg: Handle; message:integer; begin ha:=LSActLayer; GetOrigin(xo,yo); Locus(-xo,-yo); h0:=LNewObj; hp:=GetParent(h0); DelObject(h0); if GetType(hp)<>11 then begin if ha<>nil then begin ha := FSACTLAYER; WHILE ha <> NIL DO BEGIN; SetLWByClass(ha); SetPenColorByClass(ha); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); ha := NEXTSOBJ(ha); end; end; end; if GetType(hp)=11 then begin hg:=FInGroup(hp); ha := NextSObj(hg); if ha<>nil then begin if Selected(hg) = true then begin SetLWByClass(hg); SetPenColorByClass(hg); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); end; ha := NextSObj(hg); WHILE ha <> NIL DO BEGIN; SetLWByClass(ha); SetPenColorByClass(ha); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); ha := NEXTSOBJ(ha); end; end; end; LSByClass; LWByClass; PenColorByClass; FillColorByClass; FPatByClass; ReDrawAll; end; Run(Classdf); Quote Link to comment
Pat Stanford Posted December 16, 2008 Share Posted December 16, 2008 John, Ask and you shall receive. This version also sets the marker and opacity to be by class. One correction to the description though. This script always sets the defaults to ByClass even if another object is selected when you run it. It could be modified to not do so if so desired. {Developed ?2003 Katerina Panagiotakis} {Opacity and marker by class added 2008 Pat Stanford} Procedure Classdf; var x,y,xo,yo: Real; h,oh,h0,hp,hx,ha,hg: Handle; message:integer; begin ha:=LSActLayer; GetOrigin(xo,yo); Locus(-xo,-yo); h0:=LNewObj; hp:=GetParent(h0); DelObject(h0); if GetType(hp)<>11 then begin if ha<>nil then begin ha := FSACTLAYER; WHILE ha <> NIL DO BEGIN; SetLWByClass(ha); SetPenColorByClass(ha); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); SetMarkerByClass(ha); {Added Pat Stanford 2008} SetOpacityByClass(ha); {Added Pat Stanford 2008} ha := NEXTSOBJ(ha); end; end; end; if GetType(hp)=11 then begin hg:=FInGroup(hp); ha := NextSObj(hg); if ha<>nil then begin if Selected(hg) = true then begin SetLWByClass(hg); SetPenColorByClass(hg); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); SetMarkerByClass(ha); {added Pat Stanford 2008} SetOpacityByClass(ha); {added Pat Stanford 2008} end; ha := NextSObj(hg); WHILE ha <> NIL DO BEGIN; SetLWByClass(ha); SetPenColorByClass(ha); SetfillColorByClass(ha); SetfpatByClass(ha); SetlsByClass(ha); SetMarkerByClass(ha); {Added Pat Stanford 2008} SetOpacityByClass(ha); {Added Pat Stanford 2008} ha := NEXTSOBJ(ha); end; end; end; LSByClass; LWByClass; PenColorByClass; FillColorByClass; FPatByClass; MarkerByClass; {added Pat Stanford 2008} OpacityByClass; {added Pat Stanford 2008} ReDrawAll; end; Run(Classdf); 1 Quote Link to comment
John Meunier Posted December 17, 2008 Share Posted December 17, 2008 Thanks Pat, Works Beautifully! Quote Link to comment
mike mcneil Posted December 17, 2008 Author Share Posted December 17, 2008 Thanks John and Pat. That works great! Quote Link to comment
ashot Posted April 8, 2009 Share Posted April 8, 2009 Please correct me if I am wrong. The 'Attribute Palette' at the very bottom has a triangle to choose an option for "Make All Attributes by Class". This gives the same desirable effect, doesn't it? Quote Link to comment
Pat Stanford Posted April 8, 2009 Share Posted April 8, 2009 That option for All Attributes by Class is new in VW2009. Mike is still on VW2008. Quote Link to comment
mike m oz Posted April 8, 2009 Share Posted April 8, 2009 Clarification for Fundamentals users - the Attribute Palette options are only available in the Design Series products (Architect, Landmark, Spotlight, Mechanical and Designer). Quote Link to comment
Pat Stanford Posted May 25, 2020 Share Posted May 25, 2020 A version updated for VW2020 to include Drop Shadow and Text Style has been posted in a different thread. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.