Can someone point me in the right direction on how to place dimensions on a Draft document through the API? The .NET Programmer's Guide has an example for placing dimensions in a Part document but I need to know how to do it in a Draft document.
Posted by: Terry Tyson Post date: 7/13/2011 7:03:17 AM
From the draft document get the sheets collection. From sheets get the sheet (or 'activesheet", which can be obtained from the document) you want to add dims to. Get the dimensions collection from the sheet. The collection has add methods.
'getting the Active Sheet object
Set objSheet = objDoc.ActiveSheet
'create a line2d
Set objline = objSheet.Lines2d.AddBy2Points(0.1, 0.1, 0.3, 0.3)
'create a dimension object
Set objDimension = objSheet.Dimensions.AddLength(object:=objline)
Posted by: R.D. Holland Post date: 7/27/2011 11:43:59 AM