Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
When I place dimensions and leaders in the Drawing environment with API or iLogic, I create workpoints and then I create the centermarks in order to place the dimensions with GeometryIntents. It has always worked! However, this time, I'm trying to create a centermark from a WorkPoint that comes from the part of a Substitute LevelOfDetail, but it isn't working. I'm replacing an assembly with a part and I need to get a work point from this part. Here is the code:
I can get the WorkPoint and WorkPoint Proxy, but when I try to create the centermark I get an error (common iLogic error, not meaningful). Any Idea? Thanks!
SyntaxEditor Code Snippet
doc = ThisDoc.Document oAssyDoc = ThisDrawing.ModelDocument Dim oSheet As Sheet oSheet=doc.Sheets.Item(1) Dim oView As DrawingView oView=oSheet.DrawingViews.Item(1) Dim oOccs As ComponentOccurrences oOccs=oAssyDoc.ComponentDefinition.Occurrences 'Item #1 required Subassy 'LOD #6 - LOD Substitute Dim oSubAssySubstituteOcc As ComponentOccurrence oSubAssySubstituteOcc = oOccs.Item(1).Definition.RepresentationsManager.LevelOfDetailRepresentations.Item(6).SubstituteOccurrence Dim oDiaPoint1 As WorkPoint oDiaPoint1 = oSubAssySubstituteOcc.Definition.Document.ComponentDefinition.WorkPoints.Item(2) Dim oDiaPoint1Proxy As WorkPointProxy oSubAssySubstituteOcc.CreateGeometryProxy (oDiaPoint1, oDiaPoint1Proxy) Dim oCentermarks As Centermarks oCentermarks = oSheet.Centermarks Dim oCMark As Centermark oCMark = oCentermarks.AddByWorkFeature(oDiaPoint1Proxy, oView)
Solved! Go to Solution.