06-24-2021
10:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-24-2021
10:41 PM
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