×
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

Jobs

Catia VBA / Macro Copy Image capture not capture to file

Catia VBA / Macro Copy Image capture not capture to file

Catia VBA / Macro Copy Image capture not capture to file

(OP)
thread560-351508: place capture in clipboard in stead of writing it to file VBA macro

I am trying to write a macro to
Step 1: capture a image in catia (Tools-Image-Capture-Capture(record icon)-Copy) and Copy it (Copy to clipboard) and then
step 2: open a excel file and past then ...

I can not get step 1. I have found posts that show how to capture to file, do a screen shot through windows but those do not help. I did find a post ( http://www.eng-tips.com/viewthread.cfm?qid=351508 )that Ferdo replied to saying that one exists and do a search in that forum but I had no luck locating that post. Can someone PLEASE help me with having a macro do a copy of an image and not a caturetofile.

RE: Catia VBA / Macro Copy Image capture not capture to file

(OP)
yes I saw both of these.
Thread1: http://www.eng-tips.com/viewthread.cfm?qid=184796
This one doesnt do what im looking for. this one takes catia drawing saves that are images and imports them into power point
thread2: http://www.eng-tips.com/viewthread.cfm?qid=330252
this one is performing the right task but not in the way I want. This thread (which I tested) save it to a file then imports it into ppt

Im looking for the macro not to save to a file but to perform a copy (Copy to clipboard) so I can then past it into excel. (ppt and excel I know are the same thing) its the copy vs Saving the image that is why that thread is not what im looking for. I tried doing a macro record and nothing records, so that didnt help. I would insert a picture if I knew how the picture option is asking for a URL

RE: Catia VBA / Macro Copy Image capture not capture to file

(OP)
I wanted it to perform a copy (to clipboard)and not a save to a pic file.

RE: Catia VBA / Macro Copy Image capture not capture to file

(OP)
Because I want to make a macro button and have multiple users be able to use it. By doing a save I need to then change the location for each user.

RE: Catia VBA / Macro Copy Image capture not capture to file

(OP)
ok. this may be a question for a different thread but if I do, do the file I would like to do the following but have not had any luck with either. oping with your expertiese you can help;
1) pass a variable, such as file location, from a module to a userform. I know hot to go from Userform to module just but I dont know how to do other way
around.
Module1:
picfile="\\folder\folder\folder\OBMSectionR1.emf"
UserForm1:
Set Image1.Picture = LoadPicture(picfile)

2)set the file location as a variable to be used in CaptureToFile eg.
Module1:
picfile="\\folder\folder\folder\OBMSectionR1.emf"
CATIA.ActiveWindow.Viewers.Item(1).CaptureToFile 1, picfile.Name

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!


Resources