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!

Print file properties and user info on the paper

Status
Not open for further replies.

Thosnow

Aerospace
Feb 23, 2017
68
Hello All,

I would like to have following information in a part document to be printed on the paper.

> Part file's name
> User/Log-in's name (person who log-ins the computer station)
> Date - month/date/year (when the sheet is printed)
> Page numbers (i.e page 1 of 6, 2 of 6, 3 of 6...etc)

In fact, with a VBA code I am able to print out the annotated captures to JPEG files format. However, I want to include above info on the paper margins as well (for the purpose of document verification).

Any help is really appreciated.

Quin

 
Replies continue below

Recommended for you

you said:
> Part file's name
catia.activedocument.fullname

you said:
> User/Log-in's name (person who log-ins the computer station)
classic VBA stuff --> check google

you said:
> Date - month/date/year (when the sheet is printed)
classic VBA stuff --> check google

you said:
> Page numbers (i.e page 1 of 6, 2 of 6, 3 of 6...etc)
you getting pictures from 3D, what page are you talking about?

Eric N.
indocti discant et ament meminisse periti
 
Thanks itsmyjob,

1) For catia.activedocument.fullname. how could I embed/print the file name with the print. What is the right command//syntax in CATIA to print file name on the captures?
I know how to get the file name but not sure how to get it printed on each captures and then onto the physical papers.

2) Same question as above. What is the right command/syntax to printing date and name of user log-in on paper?

3) I mean pages are annotated captures, which would be numbered in sequential page# such as (i.e page 1 of 6, 2 of 6, 3 of 6...etc).
What i mean is that each capture has its own page# printed on the paper, such as capture #1 will have "page 1 of 6...etc" printed on the papers when printing pages out....and so on.

Any suggestion is greatly appreciated.

Quin
 
you might have to create text in your captures so when you make the picture you got all info in picture.
Or you create a drawing with all views from capture and add text info using VBA.
Or you put pictures in PPT and add all info in PPT using VBA.




Eric N.
indocti discant et ament meminisse periti
 
so....what is the easier way to get text on the captures?

If I choose the first method as you said above, how can i get the text onto the captures before printing out?
What are right syntax in CATIA to embed text onto the captures?
How could I retrieve user log-in name and put it on the captures?
How could I get the date and put it on the captures?

Your suggestion and guidance are much appreciated.

Quin
 
Thanks Ferdo,

I have searched a lot on this forum but perhaps I did not use the right word(s) while searching.
As for your sample code from above link:

Sub CATMain()

Dim objNet
Set objNet = CreateObject("WScript.NetWork")
MsgBox objNet.UserName ' User
MsgBox objNet.UserDomain 'Domain
MsgBox objNet.ComputerName 'Computer

End Sub

How could I put above text (user name, user domain, computer name, and page #)onto the annotated captures when saving and printing captures on the physical papers.

What are command or syntax to achieve above? Sorry I am not an expert in programming macros in CATIA V5, that is why I have to ask for your help and from others.

Your help is greatly appreciated.

Quin
 
Please search also CATIA automation documentation, this is a screen capture from that chm file

Capture_rbotsy.jpg


Regards
Fernando

- Romania
- EU
 
Hi Ferdo...

I still have a hard time to put below text on the captures before printing them out.

Dim objNet
Set objNet = CreateObject("WScript.NetWork")
MsgBox objNet.UserName ' User
MsgBox objNet.UserDomain 'Domain
MsgBox objNet.ComputerName 'Computer

What is the syntax or Catia command to put above text on the captures?

Thank you in advance

Quin
 
Hi Ferdo...

According to V5Automation.chm, text can not be added to annotated captures in a CATPart. Your suggestion to search "Annotation" in the V5Automation.chm is for adding text onto a PRODUCT image.
I have tried different ways in both CATPart and CATProduct but can not go any where.
Please kindly verify and let me know.

How can I add/insert below code(quoted from onto annotated captures in an active CATPArt?

Sub CATMain()

Dim objNet
Set objNet = CreateObject("WScript.NetWork")
MsgBox objNet.UserName ' User
MsgBox objNet.UserDomain 'Domain
MsgBox objNet.ComputerName 'Computer

End Sub

Thank you in advance

Quin
 
Quin,

you should try to find a way to do what you need manualy in CATIA first, then look for code.

when I say you create the text in the capture, you should understand: you create the text as annotation, then bring annotation in capture. I used a shortcut because i assumed you knew a bit about what you wanted to do.

When one have a problem with something, a solution would be to pay for somebody else to do it. Did you think about that?

Eric N.
indocti discant et ament meminisse periti
 
Hi itsmyjob,

as per your post above ..."...you create a drawing with all views from capture and add text info using VBA."

How could I create a drawing with all views from capture and (then) add info using VBA?
I have looked into the "Drafting" module of CATIA V5 but views can only be created from a solid part/body.

Please help me out.

Thank you
Quin
 
Hi Jenial....

Could you please elaborate a bit more? "View from 3D" is too short and I am not quite sure what your intention is.

Thanks

Quin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor