Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am trying to add a work plane by using 'AddByTwoPlanes' method in the part environment. Here is VBA code:
Sub CreateWP()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
Dim oPartCD As PartComponentDefinition
Set oPartCD = oPartDoc.ComponentDefinition
Dim WP1 As WorkPlane
Set WP1 = oPartCD.WorkPlanes.Item(1)
Dim WP2 As WorkPlane
Set WP2 = oPartCD.WorkPlanes.Item(2)
Dim oWPlane As WorkPlane
Set oWPlane = oPartCD.WorkPlanes.AddByTwoPlanes(WP1, WP2)
End Sub
All the other work plane adding methods are working but unfortunately I am not able to use this method. When I run the code, oWPlane returns nothing after a run-time error.
Any comments on this?
Thanks!
Solved! Go to Solution.