Run Macro In Catia When a Part of Product is Opened
Run Macro In Catia When a Part of Product is Opened
(OP)
Hello,
I need a way of running a macro every time a part or product is opened. What is the best way of doing this?
Is it possible to modify the open command to do this? And if so how?
Thanks,
Will
I need a way of running a macro every time a part or product is opened. What is the best way of doing this?
Is it possible to modify the open command to do this? And if so how?
Thanks,
Will





RE: Run Macro In Catia When a Part of Product is Opened
You can't modify Open command.
What should do the macro? Where are stored your files? In a PDM/PLM system? On hard disk?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Run Macro In Catia When a Part of Product is Opened
The Macro needs to check the Rev Number the part that is being opened was created in.
EG. V5R18 or V5R24.
Any ideas?
Thanks,
Will
RE: Run Macro In Catia When a Part of Product is Opened
For example, do you have CATIA (lets say R18) already opened or not? Do you want to open CATIA (specific release and environment) when you open the file?
A program to check what release is your part can be done in any language you want and after checking the release can "intercept" CATIA and open the file inside CATIA.
Basically, if you want to check (manually) what release is the file, you can open it in any text editor and search for word release (you can find some other info if you wish, depending on your search criteria). For a better understanding I suggest you to do this with a small CATIA file and read what is inside.
Generally speaking, when you give a job to a developer is good to tell him all your procedure, conditions, constrains or what ever you think it will help him to give you a better solution.
That being said, you can search also forum or on Internet for such solutions, I know there are some applications which will tell you in what release are parts done or you can develop something starting with what I already wrote.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Run Macro In Catia When a Part of Product is Opened
The file will be opened from either double clicking or from file > open in CATIA.
I need a message to know when I have opened a R18 file in R24. Do you know any way of doing this? Any links to application coding for it?
Will I need to do this outside of CATIA or can it be done inside?
This needs to be automated when a part is opened.
Thanks
RE: Run Macro In Catia When a Part of Product is Opened
You can see also this link, you will get more idea about this problem. GELFS application looks interesting if I'm not wrong, maybe he will give you more details.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Run Macro In Catia When a Part of Product is Opened
indocti discant et ament meminisse periti
RE: Run Macro In Catia When a Part of Product is Opened
I'm not 100% sure if it can be done with a reaction, but it's worth a shot. You'll have to grab the KWA license and play around with the different available events: Instantiation, Update, FileContentModification, DragAndDrop, BeforeUpdate. When the reaction window comes up just hit F1 to bring up the CATIA help.
Drew Mumaw
www.textsketcher.com
www.drewmumaw.com
RE: Run Macro In Catia When a Part of Product is Opened
@blues1143
I truly think this is close to impossible without the proper API access. You need a BeforeOpen event triggering your code and VBA/VB6/VB.NET can't help you there. The closest you can get is by monitoring CATIA windows and intercept any attempt of opening a file (as itsmyjob suggested already)
About KWA: that doesn't work either. You might "leave" the Part level and go to "Document" level with KWA but, again, you'll have to have the access to the proper event.
Perhaps you need a different architectural approach: e.g. monitor your folders with some FileSystemWatcher and don't allow any Save if it comes from the wrong CATIA level. Just an idea :(
cilici
RE: Run Macro In Catia When a Part of Product is Opened
--Doug