Jump to content

Edit Viewport Annotation


Recommended Posts

Does anyone know of a way to edit a viewport annotation in a script, using DoMenuTextByName or otherwise, without invoking the Edit Viewport Dialog?

Even having the handle to the annotation group, selecting the group, and choosing DMTBN for Group Navigation Chunk 2, it brings up the dialog and makes you select the Annotations radio button.

Is there a preference selector or anything similar to preset the edit to annotations like you can do when double clicking a viewport? Or is there any way to get to the contextual menu choice for edit annotations through Vectorscript?

Link to comment

use FInGroup(GetVWGroup(Handle,2)) to get the first annotation.

Viewports are actually groups. The commands to work with them are buried in the Group section of the Function Reference.

GetVWGroup(Handle_to_Viewport, 2) get the first object in the annotations.

GetVWGroup(Handle_to_Viewport, 1) get the first object in the crop.

Once you have the handle to the first object you can use NextObj to step through the objects.

And, after writing the above, I reread your post and it looks like you are trying to enter the annotations so you can manually edit them. For that I don't have a solution.

Link to comment

What I am really trying to do is copy the annotations to the clipboard. I already have the handle to the annotations group using GetVPGroup(vphndl,2).

The only way I know to do this is to select the objects and copy with DoMenuText, but selecting the annotations group seems to select the entire viewport, not just the annotations. I thought if I could get inside the annotations group I could then select just the annotations, but I cannot yet find a way to do this.

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.

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