Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help needed: GetTechnologicalObject returning "Empty".

Status
Not open for further replies.

Ruky

Aerospace
Sep 19, 2011
26
CA
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 Im doing something wrong or missing somethin.g

Thanks,


'-----------
Sub CATMain()

Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument

Dim documents1 As Documents
Set documents1 = CATIA.Documents

Dim partDocument1 As PartDocument
Set partDocument1 = documents1.GetItem("My_model_XXXXX.CATPart")

Dim part1 As Part
Set part1 = partDocument1.Part

Dim bodies1 As Bodies
Set bodies1 = part1.Bodies

Dim body1 As Body
Set body1 = bodies1.Item("PartBody")

Dim inertia_
set inertia_ = body1.GetTechnologicalProduct ("Inertia")

dim cg (2)
inertia_.GetCOGposition cg

msgbox cg(0)

End Sub
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top