Jump to content
Sign in to follow this  
billtheia

Script to control render settings in VPs?

Recommended Posts

Is there a way to control the render settings in a viewport using vectorscript?

I'm constantly having to set custom render and hidden line/sketch settings for multiple VPs. I'd love it if there was a way to do this via script (given that the settings buttons for these render types are grayed out when I select multiple VPs.

Thanks in advance for the help.

Share this post


Link to post

I haven't played with this but you might try "value := GetObjectVariableInt(H, 1001);". See what values it returns for viewports with different rendering setting. If they vary, then try "SetObjectVariableInt(H, 1001, value);" to see if that is what you are after.

Raymond

Share this post


Link to post

I gave GetObjectVariable a look. It seems that it only deals with the top most level of rendering (hidden line, custom renderworks, etc.), no ability to discern settings within that level. It doesn't even discern the foreground rendering type.

So, it doesn't seem all that useful to me.

I considered trying to use DoMenu... but that won't help me with VPs. I really need access to the settings of the VP PIO to make the script work.

I did a little looking around for additional information but came up pretty dry. I found VectorLab but that didn't really have what I was looking for.

I found a link to the annotated vectorscript reference ( http://www.nemetschek.net/support/custom/vscript/docs.php ) but that site seems to be down. Bummer.

REALLY, I wouldn't even need the script if I could edit the sub-render-settings for all selected VPs, but VW doesn't allow that.

Any other ideas?

Can anyone point me toward some more reference material that might help?

Share this post


Link to post

You can change the render mode for multiple viewports through the viewport tab of the organization window.

You cannot however adjust background render options for the artistic mode.

That's as far as I've investigated right now.

Share this post


Link to post

As I said, I haven't played with this, but you mention Foreground Render Type => GetObjectVariableInt(H, 1036). Have you looked at the VS Function Reference Appendix? In the middle, under Viewports, there are a slew of constants that access veiwport settings. I apologize that I assumed you knew about it if you did not. There is an online version and a downloadable version. There should also be one in the VWHelp folder in your VW application folder, but some have posted they don't have that.

On the page you cited: http://www.nemetschek.net/support/custom/vscript/docs.php, the last link is the downloadable version of said VSFuncRef. It is working.

When using the object variable calls, be careful of data type. There are boolean, integer, longinteger, real, and string versions of Get and SetObjectVariableXXX() - where XXX is the type of the call. If you use the wrong type, you will still get data out, but it will be meaningless. In the function reference appendix, the types are listed after the constants.

Happy hunting.

Raymond

Share this post


Link to post

I was using the Functional Reference. It's also available via Help.

The thing that I can't seem to access is the annotated reference above the link to the 2010 VS Reference.

The only two variables that might be of use to me are RenderType and RenderBackground. Unfortunately, RenderType only gives me access to the top level of background rendering. RenderBackground gives the RW background for the VP.

Neither of these appear to give me the level of access that would be needed to change the render settings for each type of render. I can't really do any more than I can via the OIP.

Share this post


Link to post

I realize that I can set the top level of rendering for multiple VPs via the OIP but I'm looking for a way to set the "options" for those rendering modes across multiple VPs.

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.

Sign in to follow this  

 

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