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

Looks like an oversight, in 2016 under "Edit" you could rename it in the Data field, but we moved the Name to a constantly visible field in 2017 and the Nav palette Edit UI wasn't updated to include that.

 

Submitting as a bug now.  

VB-136963

Share this post


Link to post
  • 0

Oops...... thanks Jim. The list of bugs with my name next to them must be getting very large. Maybe that should show up on our Forum profiles...... :D 

 

Kevin

 

  • Like 1

Share this post


Link to post
  • 0

I don't think it is possible.  

 

There was a thread about scripting this a while ago.  I stole the idea from somebody (maybe it was you?).

 

I thought I had posted it in the old forum, but I don't see it there.

 

This script will take selected SLVP(s) and change the name to Sheet # [space] Drawing # [space] Drawing Title

 

It works ok in 2016 and so far it works in 2017.

 

Not the same as being able to rename right from the nav palette, but I find it keeps my naming convention more unified and makes it easier to figure out what viewport is what in the visibilities view of the Organization dialog box.

 

hth

 

mk

 

Procedure ViewportRename;

{Badly Scripted by Michael Klaers.  Updated Aug 2, 2015}

{This script will take all selected viewports and change the name of those viewports to be

        (Sheet Layer) (Drawing Number) (Drawing Name)

This version tries to force the name to appear immeidately 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 : String;    
    h,hh:  Handle;
    ViewportLayer: Handle;
    ViewportLayerString: String;

    
    


    Procedure RenameVP(h : HANDLE);
Begin                            {***********  BEGIN Procedure  ***********}    
    ViewportLayer:= GetLayer(h);
    ViewportLayerString:= GetLName(ViewportLayer);
    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) & (SEL=TRUE))));

End;

Run(ViewportRename);

 

 

  • Like 2
  • Love 1

Share this post


Link to post
  • 0

@michaelk Thanks for sharing this. It may have been me that mentioned it originally. I use a simple script I wrote that transfers the drawing name to the SLVP name field. I look forward to trying out your more advanced version.

 

Kevin

  • Like 1

Share this post


Link to post
  • 0

It WAS you!

 

Such a great idea.  It's made a huge difference to my workflow.

 

I love stealing good ideas :-)

 

mk

  • Like 1

Share this post


Link to post
  • 0

Thank you to you both, michaelk and Kevin. I'm looking forward to using this script to get all of my generic SLVP names under control.

Share this post


Link to post
  • 0
On 9/27/2016 at 8:23 PM, JimW said:

Looks like an oversight, in 2016 under "Edit" you could rename it in the Data field, but we moved the Name to a constantly visible field in 2017 and the Nav palette Edit UI wasn't updated to include that.

 

Submitting as a bug now.  

VB-136963

Hello and thanks for response on last query, i'm confused on this as well. If i use a the built in drawing title symbol then it takes the [Drawing Title] field in the viewport OIP. However this only works if i name viewport then add title. If i duplicate a sheet and then rename the viewport the drawing title symbol does not update , is the field not a live link? 

Share this post


Link to post
  • 0

Hello, I'm having the same issue than dominijk - it's tricky when duplicating sections and you want to make the section lines appear in different viewports, but they all bear the same name after duplication...

Thanks for your update

Share this post


Link to post
  • 0

Just a question on how you are trying to get section lines to show up in viewports? Are you using section line instances??? Which auto update with VVA titleblocks.

Capture.JPG

Share this post


Link to post
  • 0
On 9/28/2016 at 8:37 AM, michaelk said:

I don't think it is possible.  

 

There was a thread about scripting this a while ago.  I stole the idea from somebody (maybe it was you?).

 

I thought I had posted it in the old forum, but I don't see it there.

 

This script will take selected SLVP(s) and change the name to Sheet # [space] Drawing # [space] Drawing Title

 

It works ok in 2016 and so far it works in 2017.

 

Not the same as being able to rename right from the nav palette, but I find it keeps my naming convention more unified and makes it easier to figure out what viewport is what in the visibilities view of the Organization dialog box.

 

hth

 

mk

 

Procedure ViewportRename;

{Badly Scripted by Michael Klaers.  Updated Aug 2, 2015}

{This script will take all selected viewports and change the name of those viewports to be

        (Sheet Layer) (Drawing Number) (Drawing Name)

This version tries to force the name to appear immeidately 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 : String;    
    h,hh:  Handle;
    ViewportLayer: Handle;
    ViewportLayerString: String;

    
    


    Procedure RenameVP(h : HANDLE);
Begin                            {***********  BEGIN Procedure  ***********}    
    ViewportLayer:= GetLayer(h);
    ViewportLayerString:= GetLName(ViewportLayer);
    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) & (SEL=TRUE))));

End;

Run(ViewportRename);

 

 

I just got onto VW2017 & straight away saw that I couldn't rename sheet layer viewports so this script is a lifesaver! Is it possible to create a similar script that renames design layer viewports? It would be very helpful as I also use these extensively. Thanks for any help.

Share this post


Link to post
  • 0

There must be a fix for this. Anyone?

Edited by Boh

Share this post


Link to post
  • 0

You can rename DLVPs.  Just not in the Nav Palette.  (That's on the list to be fixed)  Select the DLVP and in 2017 the name will be at the bottom of the OIP.  You can edit it there.

 

What would you want the script to do?  There are no drawing numbers or drawing names associated with DLVPs.  If this script were modified to work with DLVPs where would it pull the name from?  Or would it just pop up a dialog box and let you type the name in?  (Which doesn't seem that different from doing it in the OIP)

 

mk

 

Share this post


Link to post
  • 0

Thanks Michaelk!

 

I couldn't find it the DLVP name for the life of me until I realised I had my attribute palette at the bottom of my OIP - right on top of where the name is....  I see the SLVP names are there too.

 

No need for DLVP naming script. The SLVP naming script is fantiastic tho.

Cheers

Share this post


Link to post
  • 0

Resource manager.

 

Copy the script.  

In the resource manager set the pull down for scripts.

Click New Script at the bottom of the Resource Manager.

It will ask for the name of a palette, which is really just a folder.  Name it.

it will next ask for the name of a script.  Name it.

A Script Editor window will appear.  Make sure the Language is set to VectorScript.

Paste the script into the window.

Click OK.

 

The script is now a resource like any other Vectorworks resource.

If you right click on the "folder" (Called a script palette in the Resource Manager) and choose Open a new palette will appear on your screen with your new script listed in it.  You can run the script by double clicking on the script in that palette. Or you can right click on the script in the Resource Manager and choose Run.

 

Let us know if you get stuck.

 

hth

mk

  • Like 1

Share this post


Link to post
  • 0

 

On 9/27/2016 at 0:23 PM, JimW said:

constantly visible field in 2017

 

@JimWwhere is the constantly visible field?

Share this post


Link to post
  • 0
1 hour ago, Mark Aceto said:

 

@JimWwhere is the constantly visible field?

 

Its at the bottom of the OIP (Object Info Palette)....

KM

 

592c8fb9a1220_ScreenShot2017-05-29at2_14_45PM.png.fc96165056536a9a95d4632a0d81b526.png

Edited by Kevin McAllister
  • Like 1

Share this post


Link to post
  • 0

Hello. 

 

What is the difference between Viewport name and drawing title?

 

Seems to me as if they serve the same purpose?  They are both attached to the viewport?

 

Sheet layers have their own title (as naturally you often have more than one viewport per sheet layer.

 

Just curious

 

Andrew

Share this post


Link to post
  • 0

The viewport name is what VW calls the viewport.  It's the name that appears in the Navigation Palette.  If you don't give the viewport a name they appear as Viewport-1, Viewport-2, etc.

 

The drawing title is what appears on the drawing in the drawing label tool.  

 

Viewport name is what VW sees.  Drawing title is what the world sees.

 

 

Share this post


Link to post
  • 0

@Andrew Daviesadding to @michaelk... 

 

It's really an organizational vs. presentation distinction.

 

I typically abbreviate viewport names to organize my drawing in a nerdy systematic hierarchy (similar to classes) for quick sorting and searching:

  • Plan Overview
  • Iso Left
  • Iso Left Persp HL
  • Iso Left Persp GL
  • Front Stage

 

However, I prefer to title drawings with natural language to improve readability for clients and collaborators:

  • Overview
  • Left Iso
  • Left Perspective
  • Left Perspective Render
  • Stage Elevation
  • Like 1

Share this post


Link to post
  • 0

I use a script to force my viewport names to be [Sheet #] [Drawing Number] [Drawing Name]

 

So it ends up being something like A2 2 Proposed Site Plan

 

That way when I'm looking at the visibility view in the navigation palette to double check what classes are visible in what viewport, all my viewports are in the order in which they appear in the drawing with the drawing label names.

 

… and then I only have to type the name once. :-)

 

  • Like 1

Share this post


Link to post
  • 0

Speaking of that script:  @Pat Stanfordhelped me fix a possible situation that could throw up an error message.

 

With thanks to Mr. Stanford, here's the updated script:

 

Procedure ViewportRename;

{Badly Scripted by Michael Klaers.  Updated Aug 2, 2015}

{This script will take all selected viewports and change the name of those viewports to be

		(Sheet Layer) (Drawing Number) (Drawing Name)

This version tries to force the name to appear immeidately 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 : String;	
	h,hh:  Handle;
	ViewportLayer: Handle;
	ViewportLayerString: String;

	
	


	Procedure RenameVP(h : HANDLE);
Begin							{***********  BEGIN Procedure  ***********}	
	ViewportLayer:= GetLayer(h);
	ViewportLayerString:= GetLName(ViewportLayer);
	VPDwgTitle := GetObjectVariableString(h, 1032);
	VPNum := GetObjectVariableString(h, 1033);
	ResetObject(h);


{	Message('Viewport Handle: ',h,chr(13), 
			'Layer Handle: ',ViewportLayer,chr(13),
			'Layer Name: ',ViewportLayerString,chr(13),
			'VP Num: ',VPNum,chr(13),
			'VP Name: ',VPDwgTitle);
}

	SetName(h, Date(2,2));
	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) & (SEL=TRUE))));

End;

Run(ViewportRename);




 

  • Love 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×