Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create New Drawing Document

Status
Not open for further replies.

Jegsaran

Automotive
Dec 16, 2020
41
Hello,
I'm trying to create a new drawing document using CATIA.Documents.Add("Drawing")

Post creation the sheet format and sizes are empty as shown.

image_xgi1x3.png


I tried the following but it is throwing err in papersize line. Is there any other way?

Code:
Dim drawingDocument1  as DrawingDocument
Dim drawingSheets1 as DrawingSheets
Dim drawingSheet1  as DrawingSheet

Set drawingDocument1 = CATIA.Documents.Add("Drawing")
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.Item(1)
drawingSheet1.PaperSize = catPaperA0
 
Replies continue below

Recommended for you

tried your code and it works... catPaperA4 works also

regards,
LWolf
 
Oh! For me it is throwing the following error

image_uxe6fw.png
 
check if you have that library in your references... (Tools-References)
if you use CATIA VBA-editor, right click on the paperSize line, and look at the definition:

Library DRAFTINGITF
C:\Program Files\Dassault Systemes\B28\win_b64\code\bin\DraftingTypeLib.tlb
CATIA V5 DraftingInterfaces Object Library

regards,
LWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor