trashcan Posted May 20 Share Posted May 20 Am I the only one who is constantly changing my Viewport Name to match Drawing Titles? What is the use case for those being independent, discrete titles??? 1 Quote Link to comment
0 Mark Aceto Posted May 20 Share Posted May 20 @michaelkhas a great script for this that will surely get Sherlocked at some point 1 Quote Link to comment
0 michaelk Posted May 20 Share Posted May 20 1 hour ago, Mark Aceto said: @michaelkhas a great script for this that will surely get Sherlocked at some point I keep hoping! Quote Link to comment
0 Tom W. Posted May 20 Share Posted May 20 3 hours ago, trashcan said: Am I the only one who is constantly changing my Viewport Name to match Drawing Titles? What is the use case for those being independent, discrete titles??? I always name my viewports "Sheet No./Drawing No. (Drawing Title)". I am quite happy typing in the Drawing Title each time but would DEFINITELY like the Viewport Name to be generated automatically given that it's based on preexisting values. Would your script do this for me @michaelk...? Quote Link to comment
0 michaelk Posted May 20 Share Posted May 20 Wrote that years ago: There are several versions and forks fo the script floating around. Here's the one that is currently a menu command in my workspace. (Not saying it's the most recent version 🙂 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, 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); 2 Quote Link to comment
0 trashcan Posted June 2 Author Share Posted June 2 This is great. @Mark Aceto what does Sherlocked mean? noob vibes Quote Link to comment
0 Mark Aceto Posted June 2 Share Posted June 2 2 minutes ago, trashcan said: This is great. @Mark Aceto what does Sherlocked mean? noob vibes I could have some fun with this but I'll give you the straight story... Years ago, there was an indie app called Watson (RIP) which was a more powerful version of Apple's stock app, Sherlock. Apple began incorporating features from Watson into Sherlock until Watson no longer had a viable way forward because users could get most of the same features for free built into their OS. Since then, Apple have notoriously continued Sherlocking indie developers. Some others that come to mind are Flux, Moom and Astropad. In the spirit of truly getting Sherlocked, Flux and Moom are far superior to Nightshift and (Split View?) but for most people trapped in the walled garden, the stock diet versions are good enough. If we started a Sherlock pool, I'd put my money on 1Password as the next target (Apple have been nipping at their heels for the past few releases). 1 1 Quote Link to comment
0 michaelk Posted June 2 Share Posted June 2 On 5/19/2022 at 8:04 PM, trashcan said: What is the use case for those being independent, discrete titles??? There is actually a reason. Names in VW have to be unique (w/ very very few exceptions). The names of the viewports that appears in the Navigation Palette and in that dialog that assigns section lines to viewports have to be unique. Or chaos reigns. But you might have 10 viewports called "Section". The Drawing Title in the OIP can be anything and doesn't need to be unique. This script takes advantage of the fact that every viewport has a drawing number, even if you choose to not make it visible. And the numbers can't repeat on a sheet layer. Therefore (assuming Use Automatic Drawing Coordination Is checked - and why wouldn't it be?) even if every viewport on a sheet layer has the same drawing title, the viewport name will be unique because all the drawing numbers have to be unique. The Drawing Title is an outward facing label. Meant to be human readable to the viewer. The Viewport Name is inward facing. Just like nobody will ever know your design layer names, nobody will every know your viewport names. I find it helpful to organize them in a way that mimics the order they appear in the drawing. Which is why I wrote that script that I hope gets "Sherlocked" soon 🙂 1 Quote Link to comment
Question
trashcan
Am I the only one who is constantly changing my Viewport Name to match Drawing Titles?
What is the use case for those being independent, discrete titles???
Link to comment
7 answers to this question
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.