Call or set custom parallel environment from VB.Net API button On_Execute cmd

Call or set custom parallel environment from VB.Net API button On_Execute cmd

Anonymous
Not applicable
525 Views
1 Reply
Message 1 of 2

Call or set custom parallel environment from VB.Net API button On_Execute cmd

Anonymous
Not applicable

I'm having a little difficulty finding a code example in VB.Net to call or set my Add-in environment from a custom button placed on the zerodoc ribbon. The button command when clicked loads an assembly template and I want to include a call in the button On_Execute code to automatically set my parallel environment rather than have the user manually select the "Environments - <Custom Environment Name>" from the Environments ribbon tab.

 

The final aim of this command will be to set the custom environment automatically, only when a document that has a custom parameter embedded within it is flagged as true.

 

I cant seem to get the object browser prototypes or the API help examples to work at all......not sure why so I'm stuck

 

Cheers dudes

 

 

 

 

0 Likes
526 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Solved this one by using the OverrideEnvironment property ,Smiley Happy

 

objMachDoc = mobjInventorApp.ActiveDocument

objMachDoc.EnvironmentManager.OverrideEnvironment = objOverideEnv

 

job done - just need this in a conditional statement to apply it only when a custom property in the document is flagged.

0 Likes