Cory W. Posted September 20, 2023 Share Posted September 20, 2023 (edited) What are some of the uses for naming a viewport? Edited September 20, 2023 by CW2020 Quote Link to comment
Popular Post E|FA Posted September 21, 2023 Popular Post Share Posted September 21, 2023 Knowing what’s what in the Organization window. 6 Quote Link to comment
Popular Post Jeff Prince Posted September 21, 2023 Popular Post Share Posted September 21, 2023 On the ranch, you never name your steer or chickens. On the Vectorworks, you always name everything. 4 5 Quote Link to comment
Cory W. Posted September 21, 2023 Author Share Posted September 21, 2023 Thanks both. And I appreciate all that. Some projects (studios) I'm asked to do it always, and others it's never ever mentioned. And no, it's not a time concern. Anyways. Just curious. Thanks again 1 Quote Link to comment
Boh Posted September 21, 2023 Share Posted September 21, 2023 When you want to link a section line to section vp for example you need to scroll through a list of viewport names to select the one you want. Auto generated names like viewport 1 and viewport 234 aren't very helpful. I don't know why you can't but it would be nice if you could link by viewport drawing title instead. I use a script to rename viewports rather than do this manually which would be very laborious. 4 Quote Link to comment
bcd Posted September 21, 2023 Share Posted September 21, 2023 2 hours ago, Jeff Prince said: On the ranch, you never name your steer or chickens. actually..... 1 1 Quote Link to comment
unearthed Posted September 21, 2023 Share Posted September 21, 2023 If you're busy you just get a lot of clutter with meaningless xxx names - unless you force a little discipline Naming means you can easily assign new content to VPs. 2 Quote Link to comment
Tom W. Posted September 21, 2023 Share Posted September 21, 2023 Another example - similar to Section Line Instances - is Detail Callout Instances 3 Quote Link to comment
Popular Post Jonathan Pickup Posted September 21, 2023 Popular Post Share Posted September 21, 2023 6 hours ago, CW2020 said: Thanks both. And I appreciate all that. Some projects (studios) I'm asked to do it always, and others it's never ever mentioned. And no, it's not a time concern. Anyways. Just curious. Thanks again The ones that ask you to name the viewports are the ones that are thinking correctly and probably useing Vectorworks more fully. I name viewports so i can find them later and when I need to use back referencing, or using the Organization dialog box to control the classes. 7 Quote Link to comment
Tom W. Posted September 21, 2023 Share Posted September 21, 2023 Plus Filter by Viewport for Graphic Legends... 1 Quote Link to comment
Christiaan Posted September 21, 2023 Share Posted September 21, 2023 Example from a current project 2 Quote Link to comment
Tom W. Posted September 21, 2023 Share Posted September 21, 2023 Are you naming your Viewports manually @Christiaan or do you have a clever way to automate it? Looks like you're using <sheet number> - <drawing number> - <drawing title> which is the same as me, albeit with different punctuation (I do it manually...) 1 Quote Link to comment
Christiaan Posted September 21, 2023 Share Posted September 21, 2023 Bit of both Tom. I use the script floating about on the forum and then I've manually added the dash separators. I should work out how to add the separators to the script. 2 Quote Link to comment
Tom W. Posted September 21, 2023 Share Posted September 21, 2023 Thanks I thought I looked at that script + decided it wouldn't do what I needed but sounds like I should look again. Or wait until you've modified it 🙂 2 Quote Link to comment
bcd Posted September 21, 2023 Share Posted September 21, 2023 Actually - I think everyone is on to something. Naming VPs can be a general nuisance - and without a systematic approach liable to be haphazard. I didn't know about the script - but it sounds like a great idea. I'll have to look into that. One step better would be that VW ingests the functionality of the script into the Create Viewport dialogue. On creation of the VP we would be offered a logical & customizable VP Name that can take advantage of the dynamic text available to Data Tags etc. 2 Quote Link to comment
Christiaan Posted September 21, 2023 Share Posted September 21, 2023 @bcd see feature request here: And the script here: 2 Quote Link to comment
bcd Posted September 21, 2023 Share Posted September 21, 2023 excellent @Christiaan thanks & good to have it included here in this thread. Quote Link to comment
Tom W. Posted September 21, 2023 Share Posted September 21, 2023 29 minutes ago, bcd said: One step better would be that VW ingests the functionality of the script into the Create Viewport dialogue. On creation of the VP we would be offered a logical & customizable VP Name Absolutely. I don't really understand why it's not already like the custom naming scheme in the File Export Options where you can insert fields + whatever separators you want + then it gets saved in your preferences for future use. Quote Link to comment
Popular Post michaelk Posted September 21, 2023 Popular Post Share Posted September 21, 2023 2 hours ago, Christiaan said: And the script here: There are several old versions of those scripts floating around. These are the most recent versions of those two scripts turned into menu commands: RenameVPs.vsmRenumber Sheet Layers.vsm 8 Quote Link to comment
Tom W. Posted September 23, 2023 Share Posted September 23, 2023 On 9/21/2023 at 5:26 PM, michaelk said: There are several old versions of those scripts floating around. These are the most recent versions of those two scripts turned into menu commands: RenameVPs.vsm 5.35 kB · 5 downloads Renumber Sheet Layers.vsm 9.9 kB · 4 downloads @michaelk just wanted to say your RenameVPs script is excellent thank you god knows why I didn't look at it earlier! I wanted to edit the punctuation + realised that menu commands aren't editable so out of interest, is there a way to access the script in a menu command that I missed or is that just their nature, that they are locked inside + can't be accessed? Instead I used one of the older scripts written out in the other thread: not sure if the version you posted above is better in some way but the one I used seems to be working fine. Again out of interest, is there a programming reason you know of to explain why VW hasn't added the functionality to allow VPs to be created with the naming of our choice automatically from the outset? Thanks 1 Quote Link to comment
M5d Posted September 23, 2023 Share Posted September 23, 2023 On 9/21/2023 at 9:11 AM, CW2020 said: What are some of the uses for naming a viewport? When you publish a drawing set as a PDF, the viewport names become the Bookmarks Adobe presents in its Bookmarks side bar. This makes navigating PDFs much easier. 1 Quote Link to comment
michaelk Posted September 23, 2023 Share Posted September 23, 2023 @Tom W. Glad you're finding it useful. I use it almost everyday 🙂 Looks like you've already figured it out. But just in case here is what I believe to be the most recent version of that script (8 years old!!). There's not much to it: 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)))); End; Run(ViewportRename); Look for the line with SetName(h, CONCAT(ViewportLayerString,' ',VPNum,' ',VPDwgTitle)); You can add whatever punctuation you like inside the CONCAT function. Just make sure it it separated by a comma and surrounded by single quotes. Currently the "punctuation" is just a space. So yours might be SetName(h, CONCAT(ViewportLayerString, '-', VPNum, ' (', VPDwgTitle, ')' )); (I didn't test that!) When you create a viewport you can name the viewport and the drawing name in the dialog box. There is a checkbox (on by default?) that names the viewport as Drawing Number/Sheet Number. I find that I often duplicate viewports, duplicate sheet layers, renumber sheets, move viewports to other sheets, etc. So I started using the script rather than checking auto name. 1 Quote Link to comment
Tom W. Posted September 23, 2023 Share Posted September 23, 2023 Thanks Michael! I can see that my version includes several references to class which are missing from the version above: this is because the most recent version posted on the other thread was one you did for @line-weight which included the class name of the VP... But the script seems to work fine nonetheless - unless you think I should clean it up to bring it in line with what you've posted above? My version also has VSEL=TRUE in the criteria - is this superfluous too or is ensuring only visible selected VPs are affected useful? 48 minutes ago, michaelk said: When you create a viewport you can name the viewport and the drawing name in the dialog box. There is a checkbox (on by default?) that names the viewport as Drawing Number/Sheet Number. I have always left this off by default + been typing in the name in the 'Viewport Name' box. Until now that is!! Now I just ignore it + use your command on the sheet layer. But I wonder why 'Dwg no/sheet no' is the only option VW gives you + you can't build your own naming scheme like in the File Export Options? Quote Link to comment
Tom W. Posted September 23, 2023 Share Posted September 23, 2023 BTW when I try + post the script I'm using I get this! Quote Link to comment
michaelk Posted September 23, 2023 Share Posted September 23, 2023 I know! That is super annoying. Here's my guess at what's going on. The software that VW uses to run this forum checks for dangerous things. One of the things it doesn't like is C H R(#) code. ( I put spaces between the letters to be able to post it here) In my original code I had a debugging message that was commented out. It used the C H R code to add a carriage return in the message to make it more readable. If you delete the Message function and the curly brackets surrounding it you should be able to post it. 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.