Software Use > Scripting

Import FEM Data via COM API

(1/1)

Tobias Bach:
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: ---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

--- End code ---

Thanks, Tobias

Ryan:
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:
Hi Ryan,

thanks, problem solved.

Tobias

Navigation

[0] Message Index

Go to full version