GetTechnologicalObject valid only for Products and not Parts/Partbodies?
GetTechnologicalObject valid only for Products and not Parts/Partbodies?
(OP)
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 root assembly.
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 root assembly.





RE: GetTechnologicalObject valid only for Products and not Parts/Partbodies?
CODE --> CATScript
Language="VBSCRIPT" Sub CATMain() Set partDocument1 = CATIA.ActiveDocument Set part1 = partDocument1.Part Set body1 = part1.Mainbody set myRef=part1.createreferencefromobject(body1) Set TheSPAWorkbench = partDocument1.GetWorkbench("SPAWorkbench") Set TheMeasurable = TheSPAWorkbench.GetMeasurable(myRef) msgbox TheMeasurable.volume End SubIf You are interested in Macros in Catia (Catscripts, Catvba) feel free to send me a message. I will wrote specified macros for free and post it on eng-tips forum