How to identify a CATPart / CATProduct ? (VB6)
How to identify a CATPart / CATProduct ? (VB6)
(OP)
Hi all,
I am currently working on a macro that "repair" broken links of a product by searching the missing parts in given directories (and recursively subdirectories). The macro is working since the name of the products (or parts) are the same as the name of the files. For example you have in the tree :
Part1 (part1.1)
so the file will be named Part1.CATPart, stored somewhere.
I have cases where this rule ain't true.
So was hoping someone here knows :
- how to straightly identify a CATPart or CATProduct (not by using it's .PartNumber, .Name) but something like a unique reference that would be hidden in the file.
- How to quickly list (in an array) the missing objects of the tree (my method is not very fast on huge assemblies)
If someone is intersted, of course I would be glad to share my code.
Synchrotron
I am currently working on a macro that "repair" broken links of a product by searching the missing parts in given directories (and recursively subdirectories). The macro is working since the name of the products (or parts) are the same as the name of the files. For example you have in the tree :
Part1 (part1.1)
so the file will be named Part1.CATPart, stored somewhere.
I have cases where this rule ain't true.
So was hoping someone here knows :
- how to straightly identify a CATPart or CATProduct (not by using it's .PartNumber, .Name) but something like a unique reference that would be hidden in the file.
- How to quickly list (in an array) the missing objects of the tree (my method is not very fast on huge assemblies)
If someone is intersted, of course I would be glad to share my code.
Synchrotron





RE: How to identify a CATPart / CATProduct ? (VB6)
CODE -->
Sub CATMain() Dim oDocument As Document Set oDocument = CATIA.ActiveDocument Select Case TypeName(oDocument) Case "ProductDocument" Dim oProductDocument As ProductDocument Set oProductDocument = oDocument MsgBox "This is a " & TypeName(oDocument) Case "PartDocument" Dim oPart As Part Set oPart = oDocument.Part MsgBox "This is a " & TypeName(oDocument) Case "DrawingDocument" MsgBox "This is a " & TypeName(oDocument) Case "AnalysisDocument" MsgBox "This is a " & TypeName(oDocument) Case "ProcessDocument" MsgBox "This is a " & TypeName(oDocument) Case "CatalogDocument" MsgBox "This is a " & TypeName(oDocument) End Select End SubRE: How to identify a CATPart / CATProduct ? (VB6)
I was not talking of identifying whether the object is a CATPart or CATProduct. I was asking if there is a way to distinguish 2 files with the same name, same partnumber and same product.name, like a Product.IdNumber, which would be unique.
RE: How to identify a CATPart / CATProduct ? (VB6)
I believe you want to know something about UUID...if yes, check this link - also the link at the bottom of the page - and of course, a search on Google with CATIA UUID would be good also.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: How to identify a CATPart / CATProduct ? (VB6)
RE: How to identify a CATPart / CATProduct ? (VB6)
Am I right ?
RE: How to identify a CATPart / CATProduct ? (VB6)
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...