×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Print file properties and user info on the paper

Print file properties and user info on the paper

Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

Quote (you)

> Part file's name
catia.activedocument.fullname

Quote (you)

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

Quote (you)

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

Quote (you)

> 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

RE: Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

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

RE: Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

(OP)
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 http://www.eng-tips.com/viewthread.cfm?qid=331177) 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

RE: Print file properties and user info on the paper

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

RE: Print file properties and user info on the paper

(OP)
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

RE: Print file properties and user info on the paper

View from 3D

Regards,
Jenia Ladkov

RE: Print file properties and user info on the paper

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

White Paper - Implementing a Multi-Domain System
IoT systems are multi-domain designs that often require AMS, Digital, RF, photonics and MEMS elements within the system. Tanner EDA provides an integrated, top-down design flow for IoT design that supports all these design domains. Learn more about key solutions that the Tanner design flow offers for successful IoT system design and verification. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close