News: Contact us to upgrade your software!

Author Topic: Import FEM Data via COM API  (Read 18270 times)

Tobias Bach

  • Client
  • **
  • Posts: 3
    •  
Import FEM Data via COM API
« on: May 15, 2013, 04:17:31 AM »
Hey Guys,

I have a problem with the ImportFEM function in VBA.
I've set the rundeck FEM & FEA Filename to existing NASTRAN .bdf & .op2 and saved the project and used the ImportFEM function. The model is imported correctly, the Load sets are available, but the load cases are not imported.
If I perform a manual import, all data is there. Due you have any clue what's the error?

This is the code I used:
Code: [Select]
Set oProject = oHs.Projects.Item(ProjectName)
oProject.Rundecks.Item(1).FilenameFEM = "D:\HyperSizer Data\Projects\Bach\Test_Batch\dummy.bdf"
oProject.Rundecks.Item(1).FilenameFEA = "D:\HyperSizer Data\Projects\Bach\Test_Batch\dummy.op2"
Call oProject.Save
Call oProject.ImportFEM

Thanks, Tobias
« Last Edit: May 15, 2013, 07:19:35 AM by Tobias Bach »

Ryan

  • Administrator
  • *****
  • Posts: 145
    •  
Re: Import FEM Data via COM API
« Reply #1 on: May 15, 2013, 07:38:20 AM »
Hi Tobias,

When you import the FEM through the COM API, the load cases are not rebuilt. You will have to manage this with some extra code. I've posted some sample code that shows how to do this.

http://hypersizer.com/help/index.php#COM/Members/com-project-import_fem.php

-Ryan

Tobias Bach

  • Client
  • **
  • Posts: 3
    •  
Re: Import FEM Data via COM API
« Reply #2 on: May 15, 2013, 08:29:49 AM »
Hi Ryan,

thanks, problem solved.

Tobias