Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
harvey_craig2RCUH
149 Views, 2 Replies

Using iLogic to create a linear dimension between two ProxyWorkPoint's

As the title, I have created proxy work points and I wish to create a linear dimension between them. The gap in my knowledge is how I turn the WorkPointProxy's into a GeometeryIntent's.

 

 

Dim oModelDoc = ActiveSheet.View(viewname).ModelDocument
Dim oAssemblyDoc As AssemblyDocument = oModelDoc
Dim oPartOcc = oAssemblyDoc.ComponentDefinition.Occurrences.ItemByName("my part") 'Name of part in assembly
Dim oPartDoc As PartDocument = oPartOcc.Definition.Document
Dim oNamedEntities = iLogicVb.Automation.GetNamedEntities(oPartDoc)
oDetailView = oSheet.DrawingViews.Item(2)'1 for main view, 2 for detail view.
Dim oGenDims As GeneralDimensions = oSheet.DrawingDimensions.GeneralDimensions

Dim oWPN3 As WorkPoint = oNamedEntities.FindEntity("WPN3")
Dim oWPN3Proxy As WorkPointProxy
oPartOcc.CreateGeometryProxy(oWPN3, oWPN3Proxy)

Dim oWPN2 As WorkPoint = oNamedEntities.FindEntity("WPN2")
Dim oWPN2Proxy As WorkPointProxy
oPartOcc.CreateGeometryProxy(oWPN2, oWPN2Proxy)

oGenDims.AddLinear(oTG.CreatePoint2d(5,5), oWPN2, oWPN3)

 

If you look at the last line I have inserted two WorkPointProxy's as my GeometryIntent's. I know this is wrong. How do I make the conversion to the correct data type?

 

Many thanks,

Harvey