Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I have an assembly drawing in which I want to draw a line in the position of a workplane. The problem is that I don't know how to get the workplane coordinates from its position in the drawing view so I can create a line based on that position (so I can view the plane position relative to other parts in the assembly).
Does anyone know a method for this?
My code this far looks like this:
'Get the refference assembly Dim oAssy As AssemblyDocument If ThisDoc.Document.AllReferencedDocuments.Item(1).DocumentType = Inventor.DocumentTypeEnum.kAssemblyDocumentObject Then oAssy = ThisDoc.Document.AllReferencedDocuments.Item(1) Else MsgBox("The Active drawing does not contain an assembly document") Exit Sub End If Dim oCons As AssemblyConstraint = oAssy.ComponentDefinition.Constraints.Item(1) Dim oEnt As Object 'Assumming oEnt is a workplane oEnt = oCons.EntityOne 'Create the sketch Dim oSheet As Sheet = ThisApplication.ActiveDocument.ActiveSheet Dim oView As DrawingView = oSheet.DrawingViews.Item(1) Dim oSketch As Sketch oSketch = oSheet.Sketches.Add() oSketch.Edit
Solved! Go to Solution.