Jump to content

How do I capture the viewport name in a Drawing Label?


Recommended Posts

See attached.  In customizing a Drawing Label, I'm hoping I can capture the name of the viewport that the Drawing Label is in.  It's able to capture the scale of the current viewport so I would think it would be easy to capture the viewport name.  But for everything I've tried to enter: #Drawing Label2#.#Name#, #Object Name#, #ObjectN#, #Viewport Name#, etc., nothing seams to work.  Does anyone have any ideas?

Screenshot 2024-03-01 at 2.01.38 PM.png

Link to comment

The Drawing Label does not allow you to access the Viewport Name. But you can get it in a Data Tag using the #N# definition.

 

If you name your viewports as you create them, the Viewport Name is stored in the Drawing Number field. This can be accessed using the #Drawing Label2#.#Drawing# definition.

 

If you rename the viewports later the name is not automatically transferred so you would have to edit it in both places or copy/paste between the two.

Link to comment

Pat,

 

Thank you so much.  It's interesting that the Data Tag doesn't automatically update the name of the viewport when it changes unlike other information that a Data Tag updates right away. If you would allow me to highjack this thread and take it in another direction, a questions I've always wondered is what is the program language is that Data Tags use?  I've written a fair amount of scripts and I feel like Data Tags could be very powerful, but have had trouble finding where I can find more information about the language it uses and how to access different functions or procedures.  Any insights on that would be greatly appreciated.

 

Dave

Link to comment

I don't know what the name of the "language" is.  It is not really a language, but more of a tag system. You can do a little bit of math and have access to an IF/Then (actually that is called a trinity operator).

 

You then have "full" access to Python and Vectorscript through the Worksheet #WS_RunScript command. But then, as I have been told, 

 

Quote

"What you are trying to do sounds fancy, and as such it sounds like it won't work.”

Vlado Stanev, VW SDK List Dec. 4, 2015

 

  • 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
Reply to this topic...

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