70001726 SelectionPreview to work with any user waiting point

Article 70001726
Type HowTo
Product Engine
Version 8004
Date Added 3/31/2020
Fixed No
Submitted by Mario Messina

Summary

SelectionPreview to work with any user waiting point

Solution

//enable selection preview
document.GlobalRenderProperties.SelectionPreview |= vdRenderGlobalProperties.SelectionPreviewFlags.ON;
//overwrite the ActionAdd event in order to diside with which Action we will enable selection preview
document.ActionAdded += Document_ActionAdded;

private static void Document_ActionAdded(BaseAction action)
{
//example enable selection preview when move grip points
if(action.GetType().Name == "CmdMoveGripPoints")
action.ValueTypeProp |= BaseAction.valueType.OBJECTSELECT;
}

Send comments on this topic.