如上图,BlockUI 中直接操作打开一个部件,会与对话框框架设置的撤销标记冲突!帮助文档有举例:
You can choose one of many NX Open APIs to change the displayed part. Some of these APIs may delete undo marks that are set by dialog framework.
Example:
The PartCollection::SetDisplay API deletes the undo marks set by dialog framework but the UF_PART_set_display_part API does not delete the undo marks.
所以用下变通迂回方法,先用UF_PART_open_quiet后台打开,然后再用UF_PART_set_display_part设为显示部件,完美!