Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to put LoadMesh into LoadDefinition (using FEMAP API)

Status
Not open for further replies.

shoomilka

New member
Oct 22, 2011
2
When I use a command LM = LD.ID all created loadMeshes disappears from model tree. If I don't use this command loadMeshes puts into Other Loads (passing any Load Definition).

Code:
Sub createLoadsX(i As Integer)
	LS.Active = LS.ID

	Dim gr As Group
	Dim grID As Long
	grID = wb.Sheets(wsh).Cells(2+i, 17).Value
	Dim s As Set
	Set gr = App.feGroup
	gr.Get(grID)
	Set s = gr.List(FGR_NODE)

	Dim LM As femap.LoadMesh
	Set LM = App.feLoadMesh

	Dim LD As femap.LoadDefinition
	Set LD = App.feLoadDefinition
	LD.PutAll(3,FT_NODE,FLT_NFORCE,"")
	'LD.Active = 3

	LM.type = FLT_NFORCE

	LM.XOn = True
	LM.YOn = False
	LM.ZOn = False

	LM.x = wb.Sheets(wsh).Cells(2+i, 13).Value

	'LM.expanded = True
	'LM.setID = LS.ID
	'LM.LoadDefinitionID = 3

	s.Reset
	For j = 1 To s.Count
		s.Next()
		LM.meshID = s.CurrentID
		LM.Put(LM.NextEmptyID)
	Next

End Sub

Can you help me, please.
 
Replies continue below

Recommended for you

WOW! I've found a solution!

Code:
Dim LD As femap.LoadDefinition
Set LD = App.feLoadDefinition
LD.PutAll(3,FT_SURF_LOAD,FT_NODE,"")

and

Code:
LM.LoadDefinitionID = 3

So, LD.loadType needs to be FT_NODE and LD.dataType = FT_SURF_LOAD. This constants will create load definition with type Force on Node,
title will be "Acceleration on Node" by default, but really this will be Force on Node.

[bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor