Hi,
I dont get errors and I follow the proper structuring of macro code....so how come when I try use the macro run window (Catia toolbar: Tools \ Macros \ Macros List Window) and press the run button..the macro does not execute...BUT if I open Catia VBA window and press F5 on the module ..the...
Hi GELFS,
The hierarchy of the product within the product tree. Given the Root Product is Level 1, its children are Level 2 and then its grandchildren are Level 3....and so on and so forth. I am trying to find the automation object for giving the hierarchy of the products of an assembly.
I cant seem to find the automation object for acquiring the assembly level number of a product object in a product tree. I figured that if the analyze BOM default tool can output the assembly level number, there should be an automation object available for catvba or catscript. Does anyone know...
Hi ferdo,
That works! Although I've gotten a bit greedy and tried if I can acquire the parent product of each selected item the macro loops through. I tried doing this:
Prnt = selection1.item(i).value.parent.name. It worked well for the first item on the selection. But the next iteration...
Hi ferdo,
That approach works, but if I want to use catvba all the way, is there another way of getting the instance numbers?
Thanks for the quick response
Hi,
I have the following code below. My intent is to get all the instance partnumbers from all the documents in my activedocument.
I expect that the variable "nam" below will give me XXXXXXX.1 ,XXXXXXX.2, ...,XXXXXX.n
but the variable just returns XXXXXXXX.CATPART...
Hi,
Problem is I keep getting errors stating that the GetTechnologicalObject does not work when I try to use it on a partbody. But it works when I use it on a product ....I basically want to get the inertia matrix of the Mainbody in a multi-partbody catpart contained in a sub assembly of a...
Hi,
Does Catvba only run through the Catia window or can you also run it through a database? I read somewhere in the net that Catia is just a portal to the database that holds the product documents. SO I am curious if you can skip the portal and just run catvba directly in the database itself...
Hi,
Im not getting errors with getting the technological object for the catpart. But it's returning nothing about the part I want to analyze inertia on (and yes the part has a body called "PartBody").
Am I using the gettechnologicalobject method on the wrong document? Please let me know if...
Hi I tried the help feature of catia vba but the procedure it gives is for scripting. So I cant get past the error saying the automation object does not exist. Is there another way for creating a text file through catvba instead of script? Also I still want to learn how to script, so in...
Hi,
My Catvba works fine when it outputs data about a HUGE catia assembly. It's just that the speed slows down incrementaly as the output file lines increase beyond around 800 to 1000 lines. My output file is Excel-- the output operation occurs for each loop in a given sub assembly. Does...
Thanks "itsmyjob",
I dont get the error message anymore. But now I have a new problem. When I try to output to excel I do this:
mycell.cells(cell_row,2)=cg(0)
mycell.cells(cell_row,3)=cg(1)
mycell.cells(cell_row,4)=cg(2)
Yet nothing is showing in the excel sheet. Is it because I am calling...
Hi ferdo,
Thanks for this. Iam pretty much new to Catia VBA programming. I do well in excel VBA but translating my skills to CATvba has been a challenge. I have another thread in the forums. I posted the code that I am working on would you mind taking a look at it also?
thread560-338995
I know CreateObject("EXCEL.Application") works well with excel 2003. But I want to open excel 2010 instead of 2003 (I have both in my machine).
Tried CreateObject("EXCEL2010.Application") and CreateObject("2010EXCEL.Application")---both did not work.
Hi guys,
So I have the code below. This is my first time trying to get the inertia data from an assembly's parts. Since this is my first time I need someone to tell me where I am doing something wrong or if I am missing a declaration somewhere. Please help.
Sub CATMain()
'!!!!!Purpose of...