Automated Title Block and more
Automated Title Block and more
(OP)
Hello everyone ! my name is Andre. Im an IT student internshipping in a metal design factory working for the first time with Catia.
I'm working using Catia v5r26.
So here they have a custom title block someone made, and they use it for all the parts.
The thing is they have it in a CATdrawing, each time they need it they create a copy of the file and delete the previous part views and data. And they fill the gaps with the new information by hand.
I'm trying to find a way to have the custom title block in a macro or by someway that would be more easily acessible. And fill the gaps such as date, number part, material and Designer automatically (getting that information from the part itself).
1 - Would there be a way to "transfer" the custom title block they have into code ? or do i need to draw it all over again ? I don't have much experience creating tables and its not simple, it has different column and row width, an image...
2 - Can I get that automated filling of the gaps using only formulas ? or is macro necessary too ?
I've searched but haven't found a thing like this. However if you can send me links or something I appreciate :D
Thank you in advance, any help is amazing
André
I'm working using Catia v5r26.
So here they have a custom title block someone made, and they use it for all the parts.
The thing is they have it in a CATdrawing, each time they need it they create a copy of the file and delete the previous part views and data. And they fill the gaps with the new information by hand.
I'm trying to find a way to have the custom title block in a macro or by someway that would be more easily acessible. And fill the gaps such as date, number part, material and Designer automatically (getting that information from the part itself).
1 - Would there be a way to "transfer" the custom title block they have into code ? or do i need to draw it all over again ? I don't have much experience creating tables and its not simple, it has different column and row width, an image...
2 - Can I get that automated filling of the gaps using only formulas ? or is macro necessary too ?
I've searched but haven't found a thing like this. However if you can send me links or something I appreciate :D
Thank you in advance, any help is amazing
André
RE: Automated Title Block and more
Regards
Fernando
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
RE: Automated Title Block and more
is the first search item...
but yes. My company has custom title-block script that draws everything...
regards,
LWolf
RE: Automated Title Block and more
I used their custom title block as a background view in Page Setup. Is it possible to get this into the code ?
I'm having problems also in filling the gaps
RE: Automated Title Block and more
Regards
Fernando
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
RE: Automated Title Block and more
regards,
LWolf
RE: Automated Title Block and more
Is there an automatic way to do this ? or it has to be written ?
RE: Automated Title Block and more
Regards
Fernando
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
RE: Automated Title Block and more
"In this case you can write on the drawing sheet a text in a specific point location. Put a point where you want to add text, take the coordinates and do it in a separate macro. Your text still can be added in the title block field, is not neccessary to open and edit the title block (I suppose is not a picture)."
I will try this instead.
RE: Automated Title Block and more
Regards
Fernando
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
RE: Automated Title Block and more
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")
Set drawingViews1 = drawingSheet1.Views
Set drawingView1 = drawingViews1.Item("Background View")
Set drawingTexts1 = drawingView1.Texts
Set drawingText1 = drawingTexts1.Item("Text.82")
RE: Automated Title Block and more
CODE
I'd say that you're going to have really hard time exploring those texts since they have auto-generated names. It means each time a text get pasted in a list it gets unique number as a suffix. So the same piece of a frame titleblock is going to have different names on different sheets.
RE: Automated Title Block and more
Here's the titleblock.
Little Cthulhu I've tried your code and it ran but didnt change anything whatsoever.
I pretend to use this titleblock as a background view everytime we need it for a new product. Using page setup to get it. I've tested doing this and using the "Insert Object Resolution" tool and it gives the same output for each one of the text boxes as in the original. For exameple the text box with the 1 inside puts out object Text.79.
Can i change the names of the text boxes ?
[EDIT]- I now know I can change the name of the text boxes, would that facilitate the job ? still can't change the text inside it though.
RE: Automated Title Block and more
CODE -->
And it works but it goes by the content not the box. I dont manage to get the box selection working.
RE: Automated Title Block and more
regards,
LWolf
RE: Automated Title Block and more
CODE -->
RE: Automated Title Block and more
CODE
RE: Automated Title Block and more
CODE
RE: Automated Title Block and more
Dim doc as DrawingDocument
RE: Automated Title Block and more
regards,
LWolf
RE: Automated Title Block and more
regards,
LWolf
RE: Automated Title Block and more
The number inside doesn't serve any purpose, merely to enumerate the boxes. The boxes names go like Text_01 ...
RE: Automated Title Block and more
Thanks for correcting.
What error? Post a screenshot.
More information saves time.
RE: Automated Title Block and more
CODE -->
Sorry It's in portuguese, but it basically says Error in compilation, End of instruction missing
RE: Automated Title Block and more
Regards
Fernando
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
https://www.youtube.com/playlist?list=PL9mSHa4SOed...
RE: Automated Title Block and more
CODE -->
I've tested with CATScript too and it puts out another error :
It says Incorrect type : 'view.Texts.Item'
RE: Automated Title Block and more
CODE --> CATVBA
RE: Automated Title Block and more
RE: Automated Title Block and more
regards,
LWolf