Need help retrieving UserRefProperties in the following code: I am able to get the standard product properties just not the user defined properties (Product:Added Properties)
Please advise...
Sub CATMain()
'Check if active document is a CATDrawing
Set CatiaApp = CATIA.Application
On Error...
lardman363 thanks for your response. I don't think "InertiaVolume.1" is available in the API documentation. Could elaborate more on the dictionary and maybe give an example.
I have the following VBA code that will loop through an assembly and assign user reference properties to each product and part (different properties depending on if it's a part or a product). A couple of issues are the "Measure Inertia" command happens to each part instance, I only need to do...
Figured it out!!! Finally...
Set oCurrentTreeNodePart = oCurrentTreeNode.ReferenceProduct.Parent.Part
Set mBody = oCurrentTreeNodePart.MainBody
Persistence always pays off [bigsmile]
Okay I removed the "On Error Resume Next" to debug the issue.
And changed lines below:
Set oCurrentTreeNodePart = oCurrentTreeNode.Part
Set mBody = oCurrentTreeNodePart.MainBody
Msgbox mBody.Name
Now I do get an error "Object doesn't support this property or method:"...
Okay I am down to one issue on this macro. Any help is very much appreciated... I am trying to get the partbody name and use in the input for the "MATERIAL/SPECIFICATION" property. See code below. Just to test I have a Msgbox to return the partbody name but It seems no matter what I do it...
All, thanks for your input. I have updated my script shown below. The only issues I am having now is skipping over same part and product instances and being able to use the "partbody" name as an property output. Please advise.
Sub CATMain()
Set productdoc = CATIA.ActiveDocument
Set product1...
Please I need help... I have created the following macros; however, they only work if the product or part is opened up in a separate window. I would like to run a single macro that would these and add the defined properties to every product and part in a assembly.
script for product...
I have been running into issues with the following CATScript wanting to open and export the same CATDrawing file twice. When this happens it will skip over other files in the folder. Any suggestions is greatly appreciated.
I would also like to have another input box that would allow me to put...
jzecha I was using your macro at the beginning of this post to open and export CATDrawings and I am running into the issue of it opening the same drawing twice. File names are "700JSC-1048_SHT_1" and "700JSC-1048A_SHT_1" and sometimes skips over other ones. Thanks for you time.