Community
Hi there,
import adsk.core, adsk.fusion, adsk.cam, traceback
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
def run(context):
try:
global _app, _ui
_app = adsk.core.Application.get()
_ui = _app.userInterface
doc = _app.activeDocument
products = doc.products
product = products.itemByProductType('CAMProductType')
cam = adsk.cam.CAM.cast(product)
ope :adsk.cam.Operation = cam.allOperations[0]
stayDownDistance :adsk.cam.CAMParameter = ope.parameters.itemByName('stayDownDistance')
print('title:{}\nname:{}\nexpression:{}'.format(
stayDownDistance.title,
stayDownDistance.name,
stayDownDistance.expression
))
except:
if _ui:
_ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
I'm developing an add-ins that uses the recently introduced ActiveSelectionEvent and allows you to check configuration information without opening a dialog.
We plan to release it on github in the future.
However, due to the above problems, it is far from what we want.
If you have some information, I would appreciate it.
I am facing the same issue.
Is there still no way to directly get the value of a CAMParameter?