Hi @Crstiano
I wrote this example ilogic code for you.
I made a simple part with a workpoint in it named "TestPoint". Then i created a drawingview from this part.
the code includes the workpoint, finds it centermark in the view and creates geometryintent from it.
Then if there already is an origin indicator it moves it to the point, else it creates it on the point.
Hope it helps 🙂
Dim oDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Sheet = oDoc.ActiveSheet
Dim oView As DrawingView = oSheet.DrawingViews.Item(1)
Dim oPartDoc As PartDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument
Dim oWP As WorkPoint = oPartDoc.ComponentDefinition.WorkPoints.Item("TestPoint")
oView.SetIncludeStatus(oWP, True)
Dim oWPCenterMark As Centermark
Dim oCenterMark As Centermark
For Each oCenterMark In oSheet.Centermarks
If oCenterMark.AttachedEntity Is oWP Then
oWPCenterMark = oCenterMark
oWPCenterMark.Visible = True
End If
Next
Dim oGeometryIntent As Inventor.GeometryIntent
oGeometryIntent = oSheet.CreateGeometryIntent(oWPCenterMark, kPoint2dIntent)
If oView.HasOriginIndicator
oView.OriginIndicator.Intent = oGeometryIntent
Else
oView.CreateOriginIndicator(oGeometryIntent)
End If
oCenterMark.Visible = False