- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I am writing a script in Python and would like the user to be able to define an operation in three steps, and at for a preview to be shown at the end of each stage. The CommandInputs are grouped into three sections on my dialog. I am trying to use doExecutePreview, am having difficulties and am struggling with the minimal documentation. I have included an OnPreview event handler but the behaviour is not as expected.
At the moment, the OnPreview event seems to fire when the command inputs in the first group of command inputs have been completed, despite the code not making a doExecutePreview call. But then it does not fire subsequently when my code calls it in response to a button being pressed.
1) what code should be placed in the event handler? should it be all the code associated with what you would like to preview, or will the presence of the handler in itself cause the sequence of features created by the
2) how does the preview appear on the screen? is the final result shown in light grey (as with the pattern command in Fusion 360) or will the affected bodies be shown with the dark edges as they would when the command is executed?
Unfortunately the documentation is a bit thin (though generally the API Reference is very good). Can anybody provide a link to some working Python code that illustrates how the preview functionality should be used?
Thanks
Gavin
Solved! Go to Solution.