Jump to content
bohlr

Make all attributes by class

Recommended Posts

Does anyone have a keyboard shortcut or script to make the default to "Make all attributes by class"

 

  • Like 1

Share this post


Link to post

You don't like clicking a 20 x 8 pixel button, then choosing an option from the fly-out menu!? I'm embarrassed to say that I've been annoyed by that tiny button for years, but have never done anything about it.

 

59c034d09cc34_ScreenShot2017-09-18at4_56_27PM.jpg.374f7f3425c259261897719843c091a3.jpg

  • Like 2

Share this post


Link to post
Guest RMcK

@bohlrI've been wanting to find a similar shortcut, but cannot locate "Make all attributes by class" as an option in edit workspace,

Share this post


Link to post

There is a drop down menu at the bottom on the attributes pallet that give a choice to make an object " make all attributes by class" or if no object is selected it makes the the default "Make all attributes by class". I was looking for a faster way than having to navigate down the attributes menu and then select an option in a drop down menu.

Share this post


Link to post

You could try this script - 

It is for an older version so it doesn't set things like the drop shadow. Someone here may be able to help you update it.

 

Kevin

 

Share this post


Link to post
On 9/18/2017 at 11:43 PM, bohlr said:

There is a drop down menu at the bottom on the attributes pallet that give a choice to make an object " make all attributes by class" or if no object is selected it makes the the default "Make all attributes by class". I was looking for a faster way than having to navigate down the attributes menu and then select an option in a drop down menu.

Another option could be to set the class to automatically apply the class definitions to objects when they are created in that class. This might solve most class issues when creating them. (Or move them to another class)

Share this post


Link to post
On 9/18/2017 at 2:18 PM, RMcK said:

@bohlrI've been wanting to find a similar shortcut, but cannot locate "Make all attributes by class" as an option in edit workspace,

Just to mention it in case it makes a difference, for some reason this is a Design Series-only option... It's a strangely arbitrary thing to omit from Fundamentals, but it doesn't seem to me that the logic as to what's in or out is particularly consistent.

Share this post


Link to post
On 9/18/2017 at 10:08 PM, ThreeDot said:

You don't like clicking a 20 x 8 pixel button, then choosing an option from the fly-out menu!? I'm embarrassed to say that I've been annoyed by that tiny button for years, but have never done anything about it.

 

59c034d09cc34_ScreenShot2017-09-18at4_56_27PM.jpg.374f7f3425c259261897719843c091a3.jpg

 

three years of using it and just stumbled across this 

Share this post


Link to post

And here is an update to the 2008 update of the script to set Attributes by Class.

 

Two notes. 1. There does not appear to be a scriptable way to set TextStyle to by class on a document wide basis. 2. Changes selected objects. If no object selected then the Document defaults are switched to by class.

 

{Developed ?2003 Katerina Panagiotakis}
{Opacity and marker by class added 2008 Pat Stanford}
{Drop Shadow and TextStyle by class added 2020 Pat Stanford}
Procedure Classdf;
var
x,y,xo,yo: Real;
h,oh,h0,hp,hx,ha,hg: Handle;
B1:Boolean; {added 2020 by Pat Stanford for DocDropShadowByCl}
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;
SetDropShadowByCls(ha, True); {Added Pat Stanford 2020}
SetFillColorByClass(ha);
SetFPatByClass(ha);
SetLSByClass(ha);
SetLWByClass(ha);
SetMarkerByClass(ha); {Added Pat Stanford 2008}
SetOpacityByClass(ha); {Added Pat Stanford 2008}
SetPenColorByClass(ha);
SetTextStyleByClass(ha); {Added Pat Stanford 2020}
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
SetDropShadowByCls(ha, True); {Added Pat Stanford 2020}
SetFillColorByClass(ha);
SetFPatByClass(ha);
SetLSByClass(ha);
SetLWByClass(ha);
SetMarkerByClass(ha); {Added Pat Stanford 2008}
SetOpacityByClass(ha); {Added Pat Stanford 2008}
SetPenColorByClass(ha);
SetTextStyleByClass(ha); {Added Pat Stanford 2020}
end;
ha := NextSObj(hg);
WHILE ha <> NIL DO BEGIN;

SetDropShadowByCls(ha,True); {Added Pat Stanford 2020}
SetFillColorByClass(ha);
SetFPatByClass(ha);
SetLSByClass(ha);
SetLWByClass(ha);
SetMarkerByClass(ha); {Added Pat Stanford 2008}
SetOpacityByClass(ha); {Added Pat Stanford 2008}
SetPenColorByClass(ha);
SetTextStyleByClass(ha); {Added Pat Stanford 2020}
ha := NEXTSOBJ(ha);
end;
end;
end;
B1:=DocDropShadowByCls;
FillColorByClass;
FPatByClass;
LSByClass;
LWByClass;
MarkerByClass; {added Pat Stanford 2008}
OpacityByClass; {added Pat Stanford 2008}
PenColorByClass;
{There does not appear to be a VS procedure to set set Text Style by class for hte document as of VW2020}
ReDrawAll;
end;
Run(Classdf);

 

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...