Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When inserting a mesh via my script while parametric mode, the mesh name does not insert to the component tree.
This behavior was not seen before the latest Fusion (version 2.0.10440).
How can I resolve it? Thanks in advance.
import adsk.core, adsk.fusion, traceback
_app: adsk.core.Application = adsk.core.Application.get()
_ui: adsk.core.UserInterface = _app.userInterface
def run(context):
try:
root: adsk.fusion.Component = _app.activeProduct.rootComponent
isParametric = _app.activeProduct.designType == adsk.fusion.DesignTypes.ParametricDesignType
if isParametric:
baseF = root.features.baseFeatures.add()
baseF.startEdit()
root.meshBodies.add("C:/temp/ball.stl", adsk.fusion.MeshUnits.MillimeterMeshUnit)
if isParametric:
baseF.finishEdit()
except:
if _ui:
_ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
In Direct Mode
In Parametric Mode
Solved! Go to Solution.