CatiaV5 macro to save selected part/product(s) with filename same as part number.
CatiaV5 macro to save selected part/product(s) with filename same as part number.
(OP)
Hello!
Our design manager asked for a CatiaV5 script that will save the selected/active CatPart(s) or CatProduct(s) using the
part number as the new filename. I am very efficient with MS Excel VBA but new to CatiaV5 VBA. Can anybody help
with such a script? It would help me learn some of the unique aspects of CatiaV5 VBA.
Our design manager asked for a CatiaV5 script that will save the selected/active CatPart(s) or CatProduct(s) using the
part number as the new filename. I am very efficient with MS Excel VBA but new to CatiaV5 VBA. Can anybody help
with such a script? It would help me learn some of the unique aspects of CatiaV5 VBA.





RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
indocti discant et ament meminisse periti
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
Can you give a little bit more details? Did you tried something?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
I did try recording a script but results were not that helpful. 100% of my scripting knowledge is with
Microsoft Excel and I consider my skill level to be good. I am brand new to CatiaV5 and at ground zero
with CatiaV5 specific programming.
No I have not yet tried to script anything yet. I did buy the book CatiaV5 macro programming by D. Ziethen
and just starting to learn the Catia VBA side of things.
This is what I would like to automate.
1. Select a CatPart or a CatProduct.
2. Obtain the properties part number value of the selected object.
3. Obtain directory path of the top level assembly CatProduct file.
4. File save the selected CatPart or CatProduct using a filename equal to the properties part number.
and in the same directory as the top level CatProduct. ( Ignoring file save overwrite warning/error messages )
Right now our designers are doing this manually for each part/product -> double click on the object, get properties
part number ( copy ) then do a file save as and ( paste ) the name in. Very repetitious work especially when you
have a larger design.
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
Please go get some info by reading the V5Automation.CHM file , there are many scirpt you can learn from and all Object, Methods, properties... from CATIA.
Also you can find many good exemple in Ferdo's compilation here.
By reading few scripts you should be able to put something together. Share your code if you have problem, we will help (but I won't code for free).
waiting for your post.
indocti discant et ament meminisse periti
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
The V5Automation.CHM file is what I was searching for! Didn't know that existed.
( Didn't quite understand Eric's earlier post, thought he was referring to recording a macro )
That alone should get me moving forward!
THANK YOU VERY MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
I checked Ferdo's compilation, downloaded the CHM file and opened it up but
it won't display examples or info. All I get is a table of contents. Am I doing
something wrong. The CHM in my Catia folder worked great.
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: CatiaV5 macro to save selected part/product(s) with filename same as part number.