Jump to content

Optimizing Workflow for Update Viewports on Class/Layers Visibility


Recommended Posts

I'm facing a recurring problem in my workflow and would like to ask for your help.
 

I usually start by creating a rough sketch of my stages and send some drafts to the client. If they are approved, I continue with the project.

However, in the initial sheets of the project, I only include the basics, such as overall stage views. As the project progresses, more elements come into play, like lasers, special effects (SFX), and other components that I need to divide into different classes or layers.

The problem is that I then have to update the visibility of these classes/layers in numerous viewports constantly, which is very time-consuming.
 

I would like to know if there is a more efficient workflow I could follow to avoid this situation or to make updating the viewports easier.


Thank you in advance for your help!

Link to comment

Two points:

  • Make a template file set up with everything you could need. Our standard template has probably 20 layers in for 10ish trusses, cable bridges, several LED video layers, lighting floor package, PA etc, plus utility layers to contain venue overlays, datums and other boring stuff. All of our standard viewports have the right visibilities turned on ready - so our rigging plot sheet layer has venue, truss and hoists visible and fixtures hidden. Get in to the auto-classing options in Spotlight Preferences. We have it auto-class truss, fixtures and rigging loads automatically, so we generally don't need to create classes much unless something weird comes up.
  • If you're wanting to get more in to efficiency and automation, have a look at scripting with Python. (I say Python rather than Vectorscript as there is so much more learning resource for it on the internet, and it's great). It seems complicated to people that haven't coded before (it did to me last year when I started) but now I've written a ton of business-specific plugins that do exactly what I want. I have ones that can automatically change class and layer visibility for a new viewport in a few clicks, based on our specific content and classing structure. You need to have a really solid standard class and layer structure first for it to be worth it though. Some people say that it shouldn't get to needing scripting, but our industry has as many opinions as there are people that work in it, and rather than the software having 'one' way of working, it's nice that if you really want to make it work your way, you can.
Edited by spettitt
  • Like 4
Link to comment

Hi @Cristiano Alves.  Have you looked into Viewport styles?  They are really useful for applying settings to multiple viewports.  If you have older projects with viewport settings you like, you could save these as viewport styles into a favourites file in your resource manager for use in future projects.

 

 

  • Like 3
Link to comment

The visibility manager is key.  Naming viewports is also key.  Does anyone have a script that will name the viewports after the drawing title name?  Maybe it just appends "VP_" to the drawing title?  That would be a great thing to have....

  • Like 1
Link to comment
11 minutes ago, grant_PD said:

The visibility manager is key.  Naming viewports is also key.  Does anyone have a script that will name the viewports after the drawing title name?  Maybe it just appends "VP_" to the drawing title?  That would be a great thing to have....

 

Try @michaelk's excellent viewport rename script. Here is the version I use but you can adapt it to give you the naming format you want:

 

Screenshot2024-07-29at15_28_02.thumb.png.6c42c4a33ab3b9345be32b9038ed066b.png

 

(it's giving me a Forbidden 403' error so have had to post it as PNG!)

 

I have it added to my right-click object context menu + use it all the time.

  • Like 2
Link to comment
2 hours ago, Tom W. said:

(it's giving me a Forbidden 403' error so have had to post it as PNG!)

 

This is a problem with the forum platform itself.

 

CHR followed by an integer in parentheses is not allowed.  It's an ASCII code.  I don't understand ASCII codes well enough to know what the danger is, but there must be something.

 

So the forum is objecting to CHR-left paren-thirteen-right paren which repeats 4 times in the Message function.  CHR-left paren-thirteen-right paren is a carriage return.  The message is an old debugging message I used when I was trying to figure out how to write it.


You can safely delete the Message function including the curly brackets around it.  It won't make any functional difference, but it will be able to be shared on the forum.

  • Like 1
Link to comment
1 minute ago, michaelk said:

 

This is a problem with the forum platform itself.

 

CHR followed by an integer in parentheses is not allowed.  It's an ASCII code.  I don't understand ASCII codes well enough to know what the danger is, but there must be something.

 

So the forum is objecting to CHR-left paren-thirteen-right paren which repeats 4 times in the Message function.  CHR-left paren-thirteen-right paren is a carriage return.  The message is an old debugging message I used when I was trying to figure out how to write it.


You can safely delete the Message function including the curly brackets around it.  It won't make any functional difference, but it will be able to be shared on the forum.

 

Et voila:

 

Procedure ViewportRename;
{TW version of Michael Klaers script 22 Sept 2023}
{This script will take all selected viewports and change the name of those viewports to be
        <Sheet Layer>/<Drawing Number> (<Drawing Title>)
This version tries to force the name to appear immediately in the name field, data tab, OIP when only one VP is selected.
Prior to this version the new name appeared immediately in the Nav Palette, but not in the name field.}
    Var
    VPDwgTitle,VPName,BText,VPNum, VPClass : String;    
    h,hh:  Handle;
    ViewportLayer: Handle;
    ViewportLayerString: String;
    Procedure RenameVP(h : HANDLE);
Begin                            {***********  BEGIN Procedure  ***********}    
    ViewportLayer:= GetLayer(h);
    ViewportLayerString:= GetLName(ViewportLayer);
    VPClass := GetClass(h);
    VPDwgTitle := GetObjectVariableString(h, 1032);
    VPNum := GetObjectVariableString(h, 1033);
    ResetObject(h);


    SetName(h, CONCAT(ViewportLayerString,'/',VPNum,' (',VPDwgTitle,')'));
    SetDSelect(h);        {These two commands are just here to force the new name to appear in the }
    SetSelect(h);        {name field immediately.  They can be deleted w/o consequence}
End;                            {***********  END Procedure  ***********}
Begin                            {***********  Main Program  ***********}    
    ForEachObject(RenameVP,(((T=VIEWPORT) & (VSEL=TRUE))));
End;
Run(ViewportRename);

 

Thanks Michael!

  • Like 2
Link to comment

You've got one of the early versions 🙂 

 

I used that version for a long time.  But someone asked for a version that just does all the viewports.  Not just the selected viewports.  I made a version that does it, but it scared me.

 

Other users convinced me that the "go-big-or-go-home" method made more sense, and I've been using it for quite some time.

 

It's the same as what you have with '& (VSEL=TRUE)' removed.

 

________________________________

 

To enjoy the full power of that script, I recommend its companion script that renumbers sheet layers.

 

This thread has both scripts:

 

 

 

 

  • Like 2
Link to comment

Ha ha yes I thought there was a go-big-or-go-home version but I guess I thought it would tax VW unnecessarily if I was constantly asking it to rename VPs which didn't need it... I am quite happy working on a sheet at a time + easy enough to select all the VPs on a sheet + run it. But I suppose I should try the all-or-nothing version + see how it works on a big file.

 

I also saw the sheet renumbering script but don't think I'd have use for this but you never know...!

Link to comment
  • 4 weeks later...
On 7/27/2024 at 6:25 PM, Jesse Cogswell said:

The other thing to look into is using the Organization window in Visibility mode rather than Details mode.  It will let you select either a class or layer and see its visibility in all Viewports and Saved Views.  I often look at this anytime I add a new class or layer.  But as a light warning, its usefulness will be tied to how well you name your Viewports.

 

image.thumb.png.ca03c94961e93de571ab34dfef3b3eb5.png

 

The toggle is the radio button in the upper stage right corner.

Jesse is right on here.  Wey quick way to make sure layers/classes show up in the right viewport or saved view. Another quick tip: I believe if you create a new class by duplicating and editing an existing one, all the current visibilities will stay intact. For me, that is one of the deciding factors on if I need to duplicate a class or create a new one. (The other being the specific class attributes) 

  • Like 1
Link to comment
  • Vectorworks, Inc Employee

Hello,

One thing to consider is that if you bring in an object from an external source - say the Resource Manager that contains classes that are not already existing in the document, they will always be invisible in any existing Saved Views or viewports.

 

While users can control the visibilities of new classes created by the user in the New Class dialogue, you have no control on imported classes. My colleague @Ben Beaumont and I are trying to see if an option for users could be considered.  It's tricky because maybe it is better that they don't suddenly appear in everything but we are of the opinion that users generally do want to see the new objects in their existing viewports and Saved Views. Without doubt the Visibilities button in the Organisation dialogue is your fast and efficient friend.


Cheers,

Peter

  • Like 2
  • Love 1
Link to comment
  • Vectorworks, Inc Employee

Thanks Grant for posting that. A quick search on the forum found this post on the Wishlist - Feature and Content Requests page. I don't know anything about it but there's a link to the developer there.

 

 

 

 

Cheers,

Peter

Link to comment
  • 4 weeks later...
On 7/27/2024 at 12:02 AM, spettitt said:

Two points:

  • Make a template file set up with everything you could need. Our standard template has probably 20 layers in for 10ish trusses, cable bridges, several LED video layers, lighting floor package, PA etc, plus utility layers to contain venue overlays, datums and other boring stuff. All of our standard viewports have the right visibilities turned on ready - so our rigging plot sheet layer has venue, truss and hoists visible and fixtures hidden. Get in to the auto-classing options in Spotlight Preferences. We have it auto-class truss, fixtures and rigging loads automatically, so we generally don't need to create classes much unless something weird comes up.
  • If you're wanting to get more in to efficiency and automation, have a look at scripting with Python. (I say Python rather than Vectorscript as there is so much more learning resource for it on the internet, and it's great). It seems complicated to people that haven't coded before (it did to me last year when I started) but now I've written a ton of business-specific plugins that do exactly what I want. I have ones that can automatically change class and layer visibility for a new viewport in a few clicks, based on our specific content and classing structure. You need to have a really solid standard class and layer structure first for it to be worth it though. Some people say that it shouldn't get to needing scripting, but our industry has as many opinions as there are people that work in it, and rather than the software having 'one' way of working, it's nice that if you really want to make it work your way, you can.

 
 Hello
@spettitt


I read your comment some time ago, and then I started looking at my files and organizing a class structure in a file.
I share the table here and ask what you think of this organization and whether, based on your experience, it is worth adding more classes.

Now I'm interested in the Python issue, for example, the first script I'm going to make could be to add classes to a text list automatically.
How do you advise me to start researching Python in Vectorworks?



image.thumb.png.55bc9a85fbc954c58f38e6caee35afdd.png

 

 

 

 

 

 

 

On 7/27/2024 at 8:47 AM, Cookie_NZ said:

Hi @Cristiano Alves.  Have you looked into Viewport styles?  They are really useful for applying settings to multiple viewports.  If you have older projects with viewport settings you like, you could save these as viewport styles into a favourites file in your resource manager for use in future projects.

 

Hello @Cookie_NZ 
If I add Viewport Style to a Viewport and change the VPStyle, all the VPs will be updated with the new classes?
I will try this!

 

 

 

 

 

 

On 8/27/2024 at 6:18 PM, scottmoore said:

Jesse is right on here.  Wey quick way to make sure layers/classes show up in the right viewport or saved view. Another quick tip: I believe if you create a new class by duplicating and editing an existing one, all the current visibilities will stay intact. For me, that is one of the deciding factors on if I need to duplicate a class or create a new one. (The other being the specific class attributes) 

Hello @scottmoore

NICE TIP about duplicate or "create new".
I normally make duplicates to use prefixed info on the name this explains how some classes were shown on viewports and other classes don't.
 

 

 

 

 

 

On 8/30/2024 at 6:54 AM, Peter Neufeld. said:

Hello,

One thing to consider is that if you bring in an object from an external source - say the Resource Manager that contains classes that are not already existing in the document, they will always be invisible in any existing Saved Views or viewports.

 

While users can control the visibilities of new classes created by the user in the New Class dialogue, you have no control on imported classes. My colleague @Ben Beaumont and I are trying to see if an option for users could be considered.


Hello @Peter Neufeld.
 

Thank you for many of your inputs throughout so many posts, it is comforting to see people who work on developing a tool (in this case VW) helping users.
 

Regarding your observation, are you sure this always happens? Or is it something we need to "configure"?

It's just that in the last project I did, I kept going around here because the lasers were added at the end, and I thought I had all the classes selected in the corresponding viewport, however there was an internal Lighting-Special Effect laser class missing (or something like that ). From what you say, this class should be added as "new" and shown in all Viewports, and for me, this functionality also makes sense the way you explained it, but that's not what I experienced.

(continue)

On 8/30/2024 at 6:54 AM, Peter Neufeld. said:

 It's tricky because maybe it is better that they don't suddenly appear in everything but we are of the opinion that users generally do want to see the new objects in their existing viewports and Saved Views.

Why not a checkbox to let us choose if we want to see this class on all viewports or not?
OR/and an "organization mode" on the new classes creation moment where we can select the viewports/viewport styles present on the project where we can add the new class/layer"?

 

 

Edited by Cristiano Alves
Link to comment
44 minutes ago, Cristiano Alves said:

 
 Hello
@spettitt


I read your comment some time ago, and then I started looking at my files and organizing a class structure in a file.
I share the table here and ask what you think of this organization and whether, based on your experience, it is worth adding more classes.

Now I'm interested in the Python issue, for example, the first script I'm going to make could be to add classes to a text list automatically.
How do you advise me to start researching Python in Vectorworks?



image.thumb.png.55bc9a85fbc954c58f38e6caee35afdd.png

 

 

HI @Cristiano Alves

 

I have an example that goes the other way that might be useful for you to disassemble the script to see how it works.

 

In this example there are 3 worksheets and 3 corresponding scripts.

 

This is how it works.  

Make the class worksheet active.  The class script will create a class for every entry in the A column of the worksheet with a class description in the corresponding B column.

If a class with that name already exists, no harm.  But it will overwrite the description.

 

Same idea with the design layer worksheet and corresponding script.

 

Same idea with the sheet layer worksheet and corresponding script.

 

Make sure that the correct worksheet is active.  The class script will be happy to create classes with what you had hoped would be layer names. 🙂!

 

 

 

 

 

 

Create Classes & Layers from Worksheet v2024.vwx

  • Like 1
Link to comment
  • Vectorworks, Inc Employee
3 hours ago, Cristiano Alves said:

Why not a checkbox to let us choose if we want to see this class on all viewports or not?
OR/and an "organization mode" on the new classes creation moment where we can select the viewports/viewport styles present on the project where we can add the new class/layer"?

 

Hello, yes something like that to give users the choice of whether or not imported classes can be made visible or invisible in existing viewports and Saved Views, like they can with New classes they've created.

 

Cheers,

Peter 

Link to comment

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.

×
×
  • Create New...