Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have bee searching for a way to edit entries in the active sketch instead of creating a new one, finally found a solution that works. Maybe there is a better way.
this is the code i use in the commandExecuteHandler
#first get a reference to the application
app = adsk.core.Application.get()
#get a reference to the active design
design = adsk.fusion.Design.cast(app.activeProduct)
#get a collection of all sketches in the active component
Sketches=design.activeComponent.sketches
#determin the number of sketches
SketchCount=Sketches.count
# Get the active sketch, which is the last one, in the active design
mySketch = Sketches.item(SketchCount-1)
# If there is no active sketch, exit the command
if mySketch is None:
ui.messageBox('no sketch')
return
Solved! Go to Solution.