Jump to content
  • 1
Kevin McAllister

Renaming Viewports - Is this really not possible from the Navigation Palette?

Question

Is it really not possible to rename a SLVP from the Viewports tab of the Navigation Palette? I right click and choose edit but there's no field for the name of the viewport. I can edit the name of the drawing associated with the viewport. It seems like the only way to rename a SLVP is to select the viewport individually and rename it in the OIP. Am I missing something?

 

Kevin

  • Like 2

Share this post


Link to post

Recommended Posts

  • 0

I'm trying out this script but I get VS errors?  I copied and pasted the script but when I run it I get 

 

 

Capture.JPG

Share this post


Link to post
  • 0

Hi Grant

 

I know it works.  I use it almost every day.

 

Are you really using 2017 or are you on 2018?  (probably doesn't matter in this case - just tested it on 2017 and it still works).  Make sure you have Vectorscript selected when you paste the script and not Python.

 

Also make sure you are copying all of the script.  If you miss the final semicolon it won't run.

 

 

 

 

Share this post


Link to post
  • 0

🙂. I was pretty sure you would be on 2018.

 

If you take the script from the attached 2017 file does it work for you in 2018?

Share this post


Link to post
  • 0

Hello,

not sure if this is what you're looking for, but in the properties palette there is a small name slot in the bottom right corner if you select a viewport...

Best regards,

JB

Share this post


Link to post
  • 0
57 minutes ago, grant_PD said:

It seems to work for some viewports and not for others.  Not sure why....

 

Not sure if MichaelK's script is the same, but mine will leave some untouched if there's a name conflict (eg. if there's already a viewport with the same name).

 

KM

Share this post


Link to post
  • 0

Kevin

 

I used to have a problem with that.  If you had a page of viewports named Section and somehow 2 of them had the same drawing number.  Or if you had elevations and realized that you North South East and West mixed up and corrected them.  Problems would ensue.

 

I get around this by first naming every viewport as the current date and time, then renaming.  (Thanks, Pat!)

 

The only time I ever see an issue any more is when 2 viewports have the same drawing name and drawing number.

 

Grant, any chance that's what you're seeing?

 

I'd love to take a look at it if you don't mind sharing it with me.

 

 

mk

 

 

  • Like 1

Share this post


Link to post
  • 0

This file has 2 versions of the viewport rename script.  

 

Classic:  renames all the selected viewports

 

New & Improved:  Throws caution to the wind and renames ALL viewports in the drawing.  Go big or go home.

 

 

Viewport Rename Scripts.vwx

  • Like 3

Share this post


Link to post
  • 0

Hey @michaelk

 

It seems that in v2021 the rename viewport scripts (which are fantastic btw) still work however they do something to section lines. After running either of the scripts Section lines lose the ability to navigate back to their section viewports. As far as I can tell the section viewports still seem to be connected to the section lines. It's the navigation from section line to viewport that is lost. Have you encountered this and do you know if it is fixable?

 

Thanks

Share this post


Link to post
  • 0

I'm using this script every day and I'm not seeing that.  (I've stopped using the old version.  I've added the "do 'em all" version as a menu command.)

 

Are you putting your section lines on design layers?  (I always keep mine in annotations.). That's the only thing I can think of - but I don't know how that would cause the problem you're talking about.

 

Do you have a file will cause it to fail?

 

 

 

 

Share this post


Link to post
  • 0

So it doesn't seem to make any difference if the section line is on a design layer or in vp annotations. To make things more complicated I've also found the number referencing gets confused after running the script. See movie - all works as it should until i run the script and then both the navigation is lost as well as the number get confused. Test file with script attached too.

Viewport Rename Test File.vwx

Share this post


Link to post
  • 0

Thanks, @Boh

 

I went back to see what that script actually does.  And all it does is rename the viewport.  But there must be something tricky that the sections viewports are now doing.

 

If I get time next week I'll try to remind myself how it works and see if I can fix it 🙂 

  • Like 1

Share this post


Link to post
  • 0

Thanks for the file and video that really helps.

 

It looks like even before the section lines need to update.  After running the script turning the section line off and back on, or nudging it makes it wake up and update.

 

In fact, running the command Tools>Utilities>Reset All Plug-Ins should make them behave.  Could be a slow process on a big drawing :-).  But it gives me an idea on how to fix it.

  • Like 1

Share this post


Link to post
  • 0

That's a good tip. I can set up a worksheet I guess to toggle auto-co-ordinate on and off globally in all vp's so that the numbering will work.

 

That script of yours really is such a help so i hope it is an easy fix. Thankyou.

Share this post


Link to post
  • 0

I don't think running the reset plug ins command is fixing the navigation issue however....

Share this post


Link to post
  • 0

@michaelk - Sounds like Boh is having a similar to the one I mentioned in this thread:

 

 

(Also see my PM from December). Not sure what it is about the new marker tools that doesn't play well with the script...

Share this post


Link to post
  • 0

Yes @Andy Broomell it seems to be the same thing. I've just started with v2021 so am newly discovering the quirks. How are you managing vp names if you are not using the scripts in v2021?

Share this post


Link to post
  • 0

It's a mystery.  I see it happening on @Boh's file.  And I think that's the same issue @Andy Broomelltold me about before.  Why doesn't it happen on my files?

 

Wait.  Just checked on the file I'm drawing right now.  I'm seeing it, too.

 

Rats.

 

Share this post


Link to post
  • 0
2 hours ago, Boh said:

How are you managing vp names

I'm mostly just not 😅

 

(all the while cursing Vectorworks for the dumb way it currently names them.)

 

As a set designer I have to pump out many drawings quickly, meaning a file might not be used by me for long, in which case it's not always worth the time naming viewports in a useful way. Without the script to do it for me I can't really waste time on it. (Depends on the file of course.)

 

When it comes to linking markers, I make heavy use of the search field in the Linked Viewport dropdown, which is a godsend.

 

Hopefully one day Viewport auto-naming will exist in a smart and useful way, and until then I'll send positive thoughts in the direction of the brilliant michaelk so that perhaps a scripting solution will be found for 2021.

 

 

 

Share this post


Link to post
  • 0

Glimmer of hope.  I know why it's failing and why it started failing in 2020 and 2021.

 

Not sure I know how to fix it… 🙂 

Share this post


Link to post
  • 0
16 hours ago, michaelk said:

Glimmer of hope.  I know why it's failing and why it started failing in 2020 and 2021.

 

Not sure I know how to fix it… 🙂 

 

I just submitted a bug report on this:

VB-176976:  Association lost between Section-Elevation Line and its viewport after renaming viewport via script

  • Like 2

Share this post


Link to post
  • 0

Thanks @Matt Panzer!

 

I did notice when I ran the script that it worked without any delay. On previous versions on a biggish file the operation would take a up to 5 or 10 seconds to complete. My thoughts were wow v2021 is fast! It seems not so...

  • Like 1

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
Answer this question...

×   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...