0% found this document useful (0 votes)
19 views2 pages

Damian Dad

This document provides a tutorial for using Femap's API to automatically create a loadset and apply nodal forces. It includes: 1) Creating a mesh model with 121 nodes in Femap. 2) Setting up a spreadsheet with dummy node IDs, force values, and directions to apply to nodes 1-121. 3) VBA code to loop through the spreadsheet values, create a new loadset in Femap, apply the force values to each node as a load, and attach the loads to the new loadset. 4) Instructions to regenerate in Femap and view the new loadset with the applied nodal forces.

Uploaded by

john12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Damian Dad

This document provides a tutorial for using Femap's API to automatically create a loadset and apply nodal forces. It includes: 1) Creating a mesh model with 121 nodes in Femap. 2) Setting up a spreadsheet with dummy node IDs, force values, and directions to apply to nodes 1-121. 3) VBA code to loop through the spreadsheet values, create a new loadset in Femap, apply the force values to each node as a load, and attach the loads to the new loadset. 4) Instructions to regenerate in Femap and view the new loadset with the applied nodal forces.

Uploaded by

john12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

12.01.

2016

FEProgramming

[Contact][Consultancy][FreeFiniteElementAnalysisSoftware][FiniteElementProgramming]
[FemapProgramming][NastranPre&Post][Tutorials][Disclaimer]
ASimpleFemapAPIProgramTutorial:toautomaticallycreateaFemaploadsetandapplysomenodalforces.
Step1:Followtutorial4tocreatethepatchofelementshownbelow:

thenodelabelsareshownandrangefrom1to121

2)Createanewworkbookandaddacommandbuttononsheet1asdemonstratedintutorial1.Fillcolumns1to4
withdummynodeid,Fx,Fy,Fzvaluestoapplyfornodes1to121asillustratedbelow:

3)TheCode:
OptionExplicit

PrivateSubCommandButton1_Click()
DimgfemapAsObject
DimLoadSetAsObject
DimLoadAsObject
DimlLsetIDAsLong
DimiAsInteger
DimlNIDAsLong
DimdFxAsDouble
DimdFyAsDouble
DimdFzAsDouble
DimiRowAsInteger
DimWSAsWorksheet
SetWS=ThisWorkbook.Worksheets(1)
iRow=2'startrowofourdatainExcel
http://m3d.org.uk/Example10.htm

1/2

12.01.2016

FEProgramming

Setgfemap=GetObject(,"femap.model")'Theopenfemapsession
SetLoadSet=gfemap.feLoadSet'SetloadSettoanewfemapfeLoadSetobject
SetLoad=gfemap.feLoadMesh()'setloadtoafemaploadmeshobjectwhichwillholdthe
'theforcevaluesataparticularnode
'Createthenewloadsetinfemap
lLsetID=LoadSet.NextEmptyID'GetauniqueIDfortheloadset
LoadSet.Title="DummyLSet"'Nameit
LoadSet.Put(lLsetID)'PutitintoFemap
'loopthroughallthedataontheworksheet
DoUntilWS.Cells(iRow,1)=""
lNID=WS.Cells(iRow,1)'Thenodeidfortheforce
dFx=WS.Cells(iRow,2)'Theforcevaluestoapplyatthisnode
dFy=WS.Cells(iRow,3)
dFz=WS.Cells(iRow,4)
Load.meshID=lNID'thenodeIDforthisload
Load.Type=1'loadoftypeforce
Load.Load(0)=dFx'settheforcevalues
Load.Load(1)=dFy
Load.Load(2)=dFz
Load.XOn=True'makethisdofactive
Load.YOn=True
Load.ZOn=True
Load.SetID=lLsetID'attachthisforcetotheloadsetwecreated
Load.Put(Load.NextEmptyID)'puttheloadintofemap
iRow=iRow+1'nextrow
Loop
EndSub

4)DoaregeninFemapandactivatetheloadsetcreated,illustratedbelow:

[Home][Up]

http://m3d.org.uk/Example10.htm

2/2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy