Thanks for the reply.
I'm trying to invoke commands created by other modules.
Specifically, if you take the helical gear add-on (https://apps.autodesk.com/FUSION/en/Detail/Index?id=9029586664984391977&appLang=en&os=Win64), which created the 'Helical Gear' entry under Create in Model mode. When I manually click the Helical Gear entry under the Create tab, I get a dialog that asks me for gear parameters like module, number of teeth, etc.
I would like to create a function that can call in to that code automatically; something like:
def create_gear_train(module, ...):
helical = rootComp.features.helical_gear_add_on
# gear1
gear1 = helical.createSimpleInput()
gear1.module = module
gear1.teeth = 15
# gear 2
gear2 = helical.createSimpleInput()
gear2.module = module
gear2.teeth = 30
# ...
That is, something that allows me to reuse the helical code from my own code. The trick specific to the helical code is that it's creation methods seem tightly coupled to the UI system so even if I could just import the functions via the python 'import' command, I'd still need to initialize a HelicalGearAddin() class and fake/mock out the calls from the GUI. Much better if I could just make an API call to fill in the fields like a regular, autocad supported feature (like createCylinder()).
From your mail "you can iterate them by id by Command-related API." sounds like the right thing but I don't think I understand. How do I identify the ID of a third-party add-on? Apologies if it's a dumb question but any pointers to example code should get me going in the right direction.
Thanks in advance!
- Rob
.