IMcProfileEdgesOptionFlags Property |
![]() |
Namespace: MediaCy.IQL.Features
Property OptionFlags As mcProfileEdgesOptionFlags Get Set
'Hide tic marks while one line is moved Private WithEvents s_myLineOverlay As McGraphOverlay Sub StartToMoveOneLine() With ThisApplication.ActiveImage.LineFeatures Dim myLineMGO As McGraphOverlay Set myLineMGO = .AutoDisplayOverlay If .Count = 0 Then MsgBox "You must have one or more lines for this test." + vbCrlf _ "Draw a few lines and then try again." 'start the line creation tool myLineMGO.SelectTool "", "McGraphObjLine", mcgtStandardAutoDisplay Exit Sub End If ' no lines yet 'Here we have at least one line to work with 'Set up to clear edges if the underlying line moves .Profiles.ProfilesEdges.OptionFlags = mcpeofAutoClearOnProfileMove Dim lEdgeCount As Long lEdgeCount = .Profiles.ProfilesEdges.FindEdges 'find some edges If lEdgeCount = 0 Then MsgBox "There were no edges detected on the line(s) you drew." Exit Sub Else 'we have some lines MsgBox "There are edges marked on your line(s)." + vbCrlf _ + "Move a line where you want edges to disappear." End If Dim myTicMarks As McLines Set myTicMarks = .Profiles.ProfilesEdges.EdgeTicMarksAsMcLines 'Show the tic marks myTicMarks.AutoDisplay = True 'Hide the tic marks myTicMarks.AutoDisplayOverlay.Visible = False 'Start the selection tool myLineMGO.SelectTool "McGraphToolSelect" 'Everything else is done in the ToolDeselected event Set s_myLineOverlay = myLineMGO End With 'ActiveImage.LineFeatures End Sub 'StartToMoveOneLine Sub s_myLineOverlay_ToolDeselected( Overlay As McGraphOverlay) Set s_myLineOverlay = Nothing 'we are done with events 'Reshow the tic marks Dim myTicMarks As McLines Set myTicMarks = ThisApplication.ActiveImage.LineFeatures.Profiles.ProfilesEdges.EdgeTicMarksAsMcLines myTicMarks.AutoDisplayOverlay.Visible = True MsgBox "You should now see edges gone from the line that you moved, but not any others." End Sub ' ToolDeselected event Sub s_myLineOverlay_ObjectMoved( Overlay As McGraphOverlay, Object As McGraphObj) Overlay.SelectTool 'stop the tool ToolDeselected event does the rest End Sub Sub s_myLineOverlay_ObjectHandleMoved( Overlay As McGraphOverlay, Object As McGraphObj) Overlay.SelectTool 'stop the tool ToolDeselected event does the rest End Sub