Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: FINET_Laurent

I used this code to import point coordinates but I think I need to read and write to the point by using code.(sketchpoints code can only read ) is there any possible way to interact directly with the inventor and VBA?

 

Private Sub CommandButton1_Click()


Dim opartDoc As PartDocument
Set opartDoc = ThisApplication.ActiveDocument
Dim opartcompdef As PartComponentDefinition
Set opartcompdef = opartDoc.ComponentDefinition


Dim osketch As Sketch
Set osketch = opartcompdef.Sketches.Item(1)


Dim osketchPoint As SketchPoint
Dim coll_x As New ArrayList
Dim coll_y As New ArrayList




For Each osketchPoint In osketch.SketchPoints

coll_x.Add osketchPoint.Geometry.x
coll_y.Add osketchPoint.Geometry.Y

Next


End Sub