I’m trying to modify a parameter of an existing object.
In the documentation , it provides an example of modifying an object:
obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Sphere) obj.ParameterBlock.Radius.Value = 5.0 node = MaxPlus.Factory.CreateNode(obj)
It works as expected but that is pertaining to an object that is about to be created. When I used the code to modify an existing one, it throws an error:
RuntimeError: invalid parameter
Here’s the code I use
# Gets the selection of objects. In this case, only the sphere objList = MaxPlus.SelectionManager.Nodes for obj in objList: obj.ParameterBlock.Radius.Value = 15.0
Is there an additional code I am missing out?
Thank you for looking at my problem.