Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
anavazquez5LRNJ
in reply to: A.Acheson

hi  @A.Acheson @JelteDeJong 

up to this point I have already sent the views to the drawing now I want to put the dimensions JelteDeJong

Here is the code I'm working with

Dim oDrawingDoc As DrawingDocument   
Dim oPartDoc As Document 
Dim oSheet As Sheet 
 oView1 As DrawingView 
Dim oView2 As DrawingView
Dim oView3 As DrawingView
Dim oView4 As DrawingView
Dim oView5 As DrawingView
Dim oView6 As DrawingView
Dim DrawingName As String = "TestPart001-Copia " 
Dim OutputFolder As String = "C:\temp\Archivos\"
']

    oPartDoc = ThisDoc.Document
    oDrawingDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, "C:\Inventor\Proyectos\Door.dwg", True) 
    oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(11, 16) '
	oPoint3 = ThisApplication.TransientGeometry.CreatePoint2d(8, 16)
	oPoint4 = ThisApplication.TransientGeometry.CreatePoint2d(14, 16)
	oPoint5 = ThisApplication.TransientGeometry.CreatePoint2d(11, 21)
	oPoint6 = ThisApplication.TransientGeometry.CreatePoint2d(11, 8)
	

	
	
	oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 1/32, kFrontViewOrientation, kHiddenLineDrawingViewStyle, KTANGENTEDGESON) 
oView3 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint3, 1 / 32, kLeftViewOrientation, kHiddenLineDrawingViewStyle, KTANGENTEDGESON)
oView4 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint4, 1 / 32,  kRightViewOrientation, kHiddenLineDrawingViewStyle, KTANGENTEDGESON)
oView5 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint5, 1 / 32,  kTopViewOrientation, kHiddenLineDrawingViewStyle, KTANGENTEDGESON)
oView6 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint6, 1 / 32,  kBottomViewOrientation, kHiddenLineDrawingViewStyle, KTANGENTEDGESON)



oDrawingDoc.SaveAsInventorDWG(OutputFolder & DrawingName & ".dwg", SaveCopyAs)'Guarda el dibujo generado
oPartDoc.Activate 
oDrawingDoc.Update 'Actualiza el Dibujo
oDrawingDoc.Activate 'Activa el Documento
oDrawingDoc.Save 'Guarda el Documento del Dibujo
'oDrawingDoc.Close
ThisDoc.Launch(OutputFolder)