Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Title block automation 1

Status
Not open for further replies.

Sebek

Mechanical
Jan 23, 2019
6
0
0
PL
Hello everybody my name is Sebastian and i'm new in catia programing macro. In my new job i;m working on catia v5 R19 and my company have some already made title blocks as drawings. Every time they draw something new they copy paste the title block and fill it by hand. What i want to do is to automat this proces to fill everything automated but this is where the problem is i don't know how to write such macro and i wan't to learn how to do it. I was looking at the macro for automated title block creator in catia the sample one, but didn't know how this works and why. The macro i want to create is i want to take for example the parameter like part number or mass from the part and place that information in text in the title block. I just need a simple explenation how to do this please help.
 
Replies continue below

Recommended for you

Hi,
i was made some same macro i think, and here is post on this forum too.

You can find some good stuff on this topic.

So how would your macro work, if you run in from drawing, it will go to the part, take parameters from part, than back to drawing and fill those parameters.
In this case, part number and drawing need to be same, so you can go to the part.

 
Hi

Thank you for help. I will check that topic and see what goodes it have and that site you liked will be probbably very helpfull. I'm new in catia programing and i want to help the people i'm working with, to make they job easier and to myself to.
 
Hello again.I was reading everything catiavbmacro's posted here but still have some problems understending making macros. I found one site where some dude is drawing his title block by macro here is the link Link and it's work great and is easy to undestaned how is working and do new lines and texts but now to fill the test using macro with a parametr like part name or nomeclature? Here is some code i found on some site taking the nomeclature from part and showing it in a pop up message box

Sub CATMain()

'Read Nomenclature CATPart Properties

nomen = CATIA.ActiveDocument.GetItem(1).Nomenclature


MsgBox nomen

End Sub
But now how to take this and put it in drawing in specific text block. Please help i was thinking this was by easy but going deeper and deeper i'm geting confused.
 
Hi
I found something interesting it's catia V5 title block creator made by some german dude Link. I tested this but i have a problem with making my new title block from added one. Ther is a option to add your title block in just a drawing frame and title block and only need to modific the text propertis but for me it don't work.
Capture_1_huckm3.png

Capture_2_yt2teg.png

Capture_3_my3lw3.png

and were i try to add a title block a get a error in this line.
 
Hi,
i think you need to try to understand those codes little bit better,you can't find anything what you need. That link i posted is very good, also there are links inside it from ferdo how to fill title block.

Take some time to figure it out, i was made some similar macro, and i read all of these and need some time, to make it good for work.

All the best
 
Status
Not open for further replies.
Back
Top