Jump to content
  • 0

Viewport Name vs. Drawing Title


trashcan

Question

11 answers to this question

Recommended Posts

  • 0
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...?

Link to comment
  • 0

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);

 

  • Like 3
Link to comment
  • 0
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 FluxMoom 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).

 

giphy.gif.6d9b7f105b5edb66f4b7f653625cc32d.gif

  • Like 1
  • Laugh 1
Link to comment
  • 0
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 🙂 

  • Like 1
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
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.

×
×
  • Create New...