Adding operation to activeSelection works only if design is not yet saved!?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This basic code works fine if the op (a setup in my case) exists in a new design that is not yet saved. Or if I call the APIs in an existing saved design, but via the text command console instead of from my add-in.
ui.activeSelections.clear()
if ui.activeSelections.add(op):
ui.commandDefinitions.itemById('IronEditTool').execute()
But if I save the design and then try to execute my add-in, the add() method returns True yet execute() shows a toast notification about invalid selection
with a matching log entry:
20240513T163531 E .9244 New Alert message. Tooltip: No operation is selected., Short Message: No operation is selected., Long Message: No operation is selected.