Unable to create OriginIndicator on a workpoint.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Experts,
Inventor 2017.4.5
Language: C# or VBA
I am attempting to create a OriginIndicator in DrawingView and would like to use a WorkPoint as reference.
This works fine in the UI and throws an exception using the API. All possible permutations and combinations has been attempted. Here is a simple sample VBA code and instructions:
1. Create a drawing document.
2. Place a base view of a part file.
3. Include any workpoint from the model.
Now run this macro:
Dim dwg As DrawingDocument
Set dwg = ThisDocument
Dim view As DrawingView
Set view = dwg.ActiveSheet.DrawingViews(1)
Dim cm As Centermark
Set cm = dwg.ActiveSheet.Centermarks(1)
Dim geomInt As GeometryIntent
Set geomInt = dwg.ActiveSheet.CreateGeometryIntent(cm)
view.CreateOriginIndicator geomInt
Cheers,
-Thilak Rao