How to reference a geometric parameter defined in Spaceclaim, in the Mechanical environment?

I am doing a geometric parametric analysis and one of the boundary conditions is calculated based on certain geometry parameters which will change from iteration to iteration. I would like to reference a parameter created in the spaceclaim environment from the mechanical environment. How can we do that?
Answers
-
Depending on the exact details, this may not require scripting at all. The easiest solution would be using the workbench parameter manager and setting the mechanical load parameter as an expression of the geometric parameter. This would link the load dependency, assuming you can actually parameterize what you need in mechanical.
If you can’t easily set data in mechanical as a parameter, you likely need to set the dependency up with a python code object that will run a Call Back on geometry change.
There is a “wbpj” module that can be imported and used to send the scripts and information from mechanical to workbench. But it may be a bit tricky and unstable to try and get the active design point value for the parameter. I would generally suggest trying to measure something in the geometry of mechanical itself with mechanical APIs rather than referencing the parameter value from another application.
0