Provides functions for managing annotations in a drawing.
Also provides access to sheets and views.
If this property is used during the lifetime of the object that contains it,
then the Dispose method should be called on the containing object.
Namespace:
Autodesk.iLogic.Interfaces
Assembly:
Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 25.0
Syntax
VB
ReadOnly Property ThisDrawing As IManagedDrawing
Get
C#
IManagedDrawing ThisDrawing { get; }
Return Value
Type:
IManagedDrawingA managed drawing object.
Remarks
Sample iLogic code:
VB
Sub Main
Dim drawingDoc = GetDrawingDoc(ThisDoc.ChangeExtension(".idw"))
If drawingDoc Is Nothing Then
Throw New Exception("The drawing must be open.")
End If
Using stdProvider = StandardObjectFactory.Create(drawingDoc)
Dim thatDrawing = stdProvider.ThisDrawing
Dim modelDoc = thatDrawing.ModelDocument
If modelDoc IsNot ThisDoc.Document Then
Throw New Exception("The drawing has the wrong ModelDocument.")
Else
TestManagedDrawing(stdProvider)
End If
End Using
End Sub
Sub TestManagedDrawing(stdProvider As IStandardObjectProvider)
Dim thatDrawing = stdProvider.ThisDrawing
thatDrawing.BeginManage("Group1")
If AnnotationsWanted Then
Dim Sheet_1 = thatDrawing.Sheets.ItemByName("Sheet:1")
Dim VIEW1 = Sheet_1.DrawingViews.ItemByName("VIEW1")
Dim RightFace = VIEW1.GetIntent({"Subassem632:2", "Part362:1" }, "RightFace")
Dim FrontFace = VIEW1.GetIntent({"Subassem632:2", "Part362:1" }, "FrontFace")
Dim genDims = Sheet_1.DrawingDimensions.GeneralDimensions
Dim linDim1 = genDims.AddAngular("Angle dimension 1", VIEW1.SheetPoint(0.3, 0.2), RightFace, FrontFace)
End If
thatDrawing.EndManage("Group1")
End Sub
Function GetDrawingDoc(fileName As String) As Document
For Each doc In ThisApplication.Documents.VisibleDocuments
If (String.Equals(doc.FullFileName, fileName, StringComparison.OrdinalIgnoreCase))
Return doc
End If
Next
Return ThisApplication.Documents.Open(fileName, True)
End Function
See Also
Reference