I would like to parametrize "Membrane Offset" highlighted below. This is not natively possible.
One can use Python Code object inserted under the Surface body to parametrize the Membrane offset value.
Here are the steps:
def after_object_changed(this, object_changed, property_name):# Do not edit this line """ Called after an object is changed. Keyword Arguments : this -- the datamodel object instance of the python code object you are currently editing in the tree object_changed -- The object that was changed property_name -- The property that was changed """ # To access properties created using the Property Provider, please use the following command. # this.GetCustomPropertyByPath("your_property_group_name/your_property_name") # To access scoping properties use the following to access geometry scoping and named selection respectively: # this.GetCustomPropertyByPath("your_property_group_name/your_property_name/Geometry Selection") # this.GetCustomPropertyByPath("your_property_group_name/your_property_name/Named Selection") if object_changed == this: surfaceBody = this.Parent offsetVal = this.GetCustomPropertyByPath("Properties/Membrane Offset").Value unit = surfaceBody.OffsetX.Unit surfaceBody.OffsetX = Quantity(offsetVal,unit)
def reload_props(): this.PropertyProvider = None # Create the property instance provider = Provider() # Create a group named Group 1. group = provider.AddGroup("Properties") # Create a property with control type Expression and a property with control type Double, and add it to the Group 1 double_prop = group.AddProperty("Membrane Offset", Control.Double) # Configure the double property to be parameterizable. As a default the property will be an input parameter. # However, by updating the ParameterType property, it can be configured to be a output parameter as well. double_prop.CanParameterize = True # Connects the provider instance back to the object by setting the PropertyProvider member on this, 'this' being the # current instance of the Python Code object. this.PropertyProvider = provider