Click or drag to resize

IMcProfileEdgesOptionFlags Property

Specifies overall optional behaviors.

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Property OptionFlags As mcProfileEdgesOptionFlags
	Get
	Set

Property Value

Type: mcProfileEdgesOptionFlags
Remarks
The OptionFlags can be set to automatically clear existing edges when the ancestor McLines or McRegions move and/or when the parent McLineProfiles changes. When moving lines that have edges marked on them, you will generally need to hide the edges before the line is moved, so that they are not left behind as orphans while the line is dragged around by the user. When the line or handle is finally placed in a new spot, then the edges are actually removed. The example shows how you might monitor these events to hide and then reshow the tic marks on lines that were not moved.
Examples
VB
'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
See Also