So I found a way to do this - basically, script is searching for the component name in the active document and listing number of instances into collection, then finding last item number from this collection and use it to search again using part number + instance ID. Here's the code that took me...
'get' as in 'read from file' I suppose
When in Catia opening the part, you get little preview on the side, that's what I would like to replicate in my own VB form.
I am either missing some documentation or this does not exist - how can I get Catia file preview?
In ideal case it would be 3D preview but thumbnail would be also great.
I searched for hours today and haven't found a single script example.
Is it really so difficult or am I having bad Friday?
My understanding is that Product.Position.SetComponents would specify specific position while in ideal case I would like to call up Smart Move function for the added component.
I have managed to use script to add parts into Root but now stuck of how to apply function for last inserted item. Any...
I managed to get the scrip to work, but failing to find any API for the function 'Insert Existing Component with positioning' - is this even possible with external script?
So I found following code:
Sub LoadDocumentToProduct()
Dim Document As ProductDocument
Set Document = CATIA.ActiveDocument
Dim MainProduct As Product
Set MainProduct = Document.Product
Set Prod = MainProduct.Products
Dim arrayOfVariantOfBSTR( 0) ' Quantity loaded documents-1...
Thanks for your reply.
Could you expand a little more where this is described? Is it the Catia's internal scripting interface documentation? Ideally I am after some samples such functionality can be achieved.
Hello,
I have so far developed small application with VB NET in VisualStudio which allows browsing parts and their details from SQL database. This also contains links to files, including CATpart.
Naturally I came to this idea that it would be nice o have a button that would send the CATpart...