Jump to content
Developer Wiki and Function Reference Links ×

Creating Viewports using a script.


MaxStudio

Recommended Posts

I would like to write a script that allows me to create a viewport that has predefined visibility settings.

A user should easily be able to select the type of viewport (RC Plan, P/T Plan, Construction Plan...) they want from a pulldown menu and then click create. The viewport would be created using a predefined crop that is all ready an object in the Template file.

Link to comment
  • 1 month later...

I was able to make one using CreateVP...

something like

VAR

h=HANDLE

r=HANDLE

BEGIN

h:=CreateLayer('ASheetLayer',2);

r:=CreateVP(h);

END;

Then use SetObjectVariableInt,Bool,etc.., to set parameters 1000-1030 as you like them, avail on appendix.

Or you could use CreateDuplicateObject from one you have.

I am trying to create a Section Viewport with vectorscript and have not been able to. I have tried CreateDuplicateObject but then I cannot change the position/direction of the section.

Any ideas?

Link to comment

Another note on 'Section Viewports'

I am able to copy an existing 'Section Viewport' but it links to the same 'Section Line' and I cannot find that parameter to change.

I found an a subobject of viewport(122) called section viewport(509) but so far I haven't had any luck here either.

Any help in creating Section Viewports would be much appreciated.

Link to comment
  • 9 years later...

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