billtheia Posted December 10, 2009 Share Posted December 10, 2009 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. Quote Link to comment
MullinRJ Posted December 10, 2009 Share Posted December 10, 2009 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 Quote Link to comment
billtheia Posted December 10, 2009 Author Share Posted December 10, 2009 Thanks, Raymond. I will give that a try. Quote Link to comment
billtheia Posted December 10, 2009 Author Share Posted December 10, 2009 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? Quote Link to comment
brudgers Posted December 11, 2009 Share Posted December 11, 2009 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. Quote Link to comment
MullinRJ Posted December 11, 2009 Share Posted December 11, 2009 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 Quote Link to comment
billtheia Posted December 11, 2009 Author Share Posted December 11, 2009 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. Quote Link to comment
billtheia Posted December 11, 2009 Author Share Posted December 11, 2009 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. Quote Link to comment
Recommended Posts
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.