CheeseMaker13
Aerospace
Hi,
First post!!
I've been tasked to automatically create drawings based on an excel spreadsheet with all the required data.
I've managed to get a script to open a new drawing, add the required text and save it using the correct naming scheme.
The problem I'm up against is that some of the information in the spreadsheet needs to go into a company set title block.
All the scripts I've found so far create the block from scratch, which isn't useful.
I was thinking I could open up a template drawing and then input all the required data like that, but I still need to be able to edit the stock title block!!!
Anybody got any thoughts on either:
A) How to add a title block inputting the required data.
B) Edit an existing title block.
This is the code that opens the drawing:
First post!!
I've been tasked to automatically create drawings based on an excel spreadsheet with all the required data.
I've managed to get a script to open a new drawing, add the required text and save it using the correct naming scheme.
The problem I'm up against is that some of the information in the spreadsheet needs to go into a company set title block.
All the scripts I've found so far create the block from scratch, which isn't useful.
I was thinking I could open up a template drawing and then input all the required data like that, but I still need to be able to edit the stock title block!!!
Anybody got any thoughts on either:
A) How to add a title block inputting the required data.
B) Edit an existing title block.
This is the code that opens the drawing:
Code:
Set oDocument = CATIA.Documents.Add("Drawing")
Set iDocument = CATIA.ActiveDocument
Set iSheets = iDocument.Sheets
Set iSheet = iSheets.Item(1)
Set iView = iSheet.Views.Item("Background View")
Set iTexts = iView.Texts