70001726 SelectionPreview to work with any user waiting point

Article 70001726
Type HowTo
Product Engine
Version 8004
Date Added 3/31/2020 12:00:00 AM
Fixed 8.8005.0.3 (4/14/2020 12:00:00 AM)
Submitted by Mario Messina

Summary

SelectionPreview to work with any user waiting point

Solution

You can do this using VDF version 8.8005.0.3 and later build, with a code like:

//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.