Jump to content
J. Miller

Creating a Viewport Custom View

Recommended Posts

Hello,

I am trying to create a custom view in a viewport.

I know the rotation i want to set

I have sucessfully made views using

"SetObjectVariableInt(vpHan, 1007, 4);" (Back View)

How does one go about setting a custom rotation of a viewport pragmatically?

I find it odd that the views (1007) do not correspond to the standard view numbers for the front, right, back & left views.

Top & Top/Plan views are correct.

Thanks in Advance

Jeff Miller

Share this post


Link to post

You should be able to use SetViewMatrix where the objectHandle can be a layer or a viewport.

Declaration:

FUNCTION SetViewMatrix(objectHandle :HANDLE; offsetX, offsetY, offsetZ :REAL; rotationXAng :REAL; rotationYAng :REAL; rotationZAng :REAL) :BOOLEAN;

Description:

Sets view matrix for layer or viewport object.

Share this post


Link to post

Thank you Miguel.

That works great.

This is my 1st script working with viewports and I have not quite figured out all the calls i can use yet.

maybe you would also know if it is possible to add a 3rd button to a custom dialog layout

"OK", "Cancel", "My Choice"

Thanks Again,

Jeff

Share this post


Link to post

You can add as many buttons as you like in a custom dialog. The predefined dialogs cannot be modified other than providing the message and default string that will appear in it.

Share this post


Link to post

hello,

What I was hoping to do was to add a button next to the "OK" & "Cancel" buttons and not in the actual custom dialog area.

Jeff miller

Share this post


Link to post

I would also like that. I have some classic dialogs with this, but I guess I won't for long.

I can't remember... is it the next version that will no longer support them?

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...