Jump to content
Developer Wiki and Function Reference Links ×

Script to control render settings in VPs?


billtheia

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.

Link to comment

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?

Link to comment

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

Link to comment

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.

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