Utilizing Femap API for Enhanced Modeling and Automation

 
Pierre-Luc Messier, ing.
 
FEMAP SYMPOSIUM 2018
 
May 22
nd
 2018
 
Femap API Introduction
 
 
API Overview
API vs Program File
Why use API?
API Programming Interface
The Type Library
Resources
Demo 1: Create user commands and keyboard shortcuts
Demo 2: Drive Femap from Excel (extract from Femap to Excel, modify in Excel, then update to
Femap)
Example 1: Path Length calculation on an antenna dish
Example 2: Calculate in-plane displacements
 
2
 
Agenda
 
 
 
Femap provides a robust set of finite element modeling and post-processing functionality.
Femap API lets you customize Femap to meet your specific needs.
 
Femap API is an OLE/COM-based programming interface to Femap. It contains hundreds of functions
that can be called from Visual Basic, VBA, C, or C++.
 
This allows Femap to become a powerful integration program for third party solutions (Excel, Word,
Matlab, SolidEdge, Catia, ... ) and significantly increases the portability of data into and out of the
program.
 
Many useful programs are delivered with Femap in an ever expanding library that can be found in the
Custom Tools toolbar. Code is provided!
 
3
 
Overview - Application Programming Interface (API)
 
4
 
Overview - Femap API
 
 
 
As well as the API, Femap also offers a macro capability (program) that allows a series of commands to
be recorded, edited and debugged, and played back. This way, you can create custom programs that
automate repetitive tasks.
 
Common usages:
Repetitive sequences of commands can be
recorded and played back.
Program File macros are easily created by the
non-programming engineers.
Program files can be modified to accept user
 input and executed from API scripts.
 
5
 
API vs Program Files
 
 
U
l
t
i
m
a
t
e
l
y
,
 
t
h
i
s
 
i
s
 
w
h
a
t
 
w
e
 
w
a
n
t
:
 
 
 
 
 
 
 
 
 
 
b
u
t
 
w
e
 
a
l
l
 
k
n
o
w
 
t
h
a
t
 
t
h
i
s
 
i
s
 
u
t
o
p
i
c
.
 
 
 
6
 
Why use API?
 
 
R
e
a
l
 
b
e
n
e
f
i
t
s
:
Automate routine tasks
Interact with model data in ways that are not natively available
Provide “canned” analysis routines
Ensure consistency in analysis methods between engineers by providing a consistent method
Enhance the functionality of FEMAP by creating add-in applications
Automate generation of analysis reports
Reduce the learning curve for newer users
Integrate FEMAP with existing methods
Modify results data
Create nodes from a CSV file
Create a custom meshing algorithm
FEMAP Add-ins can also be created that behave like standard dockable panes
 
7
 
Why use API?
 
 
Full-featured BASIC programming
environment inside the UI
IntelliSense function descriptor
auto completion
Step through interactive program
debugging
Syntax Highlighting
Object Browser
 
 
8
 
API Programming Interface
 
Debugging
 
Debugging – Additional toolbar
 
 
Full-featured BASIC programming environment inside the UI
Custom User Dialogs Editor
 
9
 
API Programming Interface
 
10
 
Type Library
 
11
 
Ressources – Custom Tools
 
E
l
e
m
e
n
t
 
U
p
d
a
t
e
 
G
r
o
u
p
i
n
g
 
M
e
s
h
i
n
g
 
P
o
s
t
P
r
o
c
e
s
s
i
n
g
 
 
All Custom Tool commands are documented in 
FemapInstallDir/pdf/CustomTools.pdf
 
Most useful tools
Element Update - Divide Beam
Grouping - Group expand
M
e
s
h
i
n
g
 
-
 
H
o
l
e
 
t
o
 
H
o
l
e
 
F
a
s
t
e
n
e
r
M
o
d
e
l
 
Q
u
e
r
y
 
-
 
M
u
l
t
i
 
D
e
p
e
n
d
e
n
t
 
R
i
g
i
d
 
C
h
e
c
k
PostProcessing - Nodes Move by Deform with Options
View - View Swap
 
 
12
 
Resources – Custom Tools
 
 
All Custom Tool commands are documented in 
FemapInstallDir/pdf/CustomTools.pdf
 
M
e
s
h
i
n
g
 
-
 
H
o
l
e
 
t
o
 
H
o
l
e
 
F
a
s
t
e
n
e
r
 
 
 
13
 
Resources – Custom Tools
 
 
M
o
d
e
l
 
Q
u
e
r
y
 
-
 
M
u
l
t
i
 
D
e
p
e
n
d
e
n
t
 
R
i
g
i
d
 
C
h
e
c
k
 
 
 
14
 
Resources - Custom Tools
 
 
F
E
M
A
P
 
A
P
I
 
R
e
f
e
r
e
n
c
e
 
M
a
n
u
a
l
 
f
o
u
n
d
 
i
n
Help->Programming
or
<FEMAP ROOT>/pdf/api.pdf
 
Include basic examples of API programs
 
 
15
 
Resources – Help and Examples
 
16
 
Demo 1
 
 
C
r
e
a
t
e
U
ser commands
K
eyboard shortcuts
N
ew toolbar and button
 
17
 
Demo 2
 
 
D
r
i
v
e
 
F
e
m
a
p
 
d
a
t
a
 
f
r
o
m
 
E
x
c
e
l
Extract material and property data from Femap to Excel, update/calculate/validate
values in Excel, then upload back to Femap
 
18
 
Example 1
 
 
P
a
t
h
 
L
e
n
g
t
h
 
c
a
l
c
u
l
a
t
i
o
n
 
o
n
 
a
n
 
a
n
t
e
n
n
a
 
d
i
s
h
 
 
 
 
Path Length = (A
i
+B
i
+C) – (A
i
'+B
i
'+C')
 
24 different paths
 
Over 230 cases
Multi angles
Different Operating Conditions
5BG .op2 file size
 
Results sent to Excel
 
19
 
Example 2
 
 
C
a
l
c
u
l
a
t
e
 
i
n
-
p
l
a
n
e
 
d
i
s
p
l
a
c
e
m
e
n
t
s
 
"Fridge door" open panel case
In-plane displacement resultant calculated for
nodes on door opening
 
20
 
Example 2
 
C
a
l
c
u
l
a
t
e
 
i
n
-
p
l
a
n
e
 
d
i
s
p
l
a
c
e
m
e
n
t
s
 
1
 
2
 
3
 
4
 
21
 
Maya User Tools
 
 
 
API Overview vs Program File
Interface
Resources - Custom Tools
The API lets you customize FEMAP to meet your specific needs
 
 
3 day API training available
 
 
 
22
 
Summary
Slide Note
Embed
Share

Femap API enables users to customize Femap to suit specific requirements through OLE/COM-based programming. This robust interface offers numerous functions for integration with third-party solutions, automation of modeling processes, and efficient data transfer. The API empowers engineers to automate routine tasks, enhance analysis methods, and create bespoke applications, ultimately optimizing workflow efficiency and collaboration in engineering design.


Uploaded on Jul 28, 2024 | 9 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Femap API Introduction by Pierre-Luc Messier, ing. B A C presented to FEMAP SYMPOSIUM 2018 date May 22nd 2018

  2. Agenda API Overview API vs Program File Why use API? API Programming Interface The Type Library Resources Demo 1: Create user commands and keyboard shortcuts Demo 2: Drive Femap from Excel (extract from Femap to Excel, modify in Excel, then update to Femap) Example 1: Path Length calculation on an antenna dish Example 2: Calculate in-plane displacements 2

  3. Overview - Application Programming Interface (API) Femap provides a robust set of finite element modeling and post-processing functionality. Femap API lets you customize Femap to meet your specific needs. Femap API is an OLE/COM-based programming interface to Femap. It contains hundreds of functions that can be called from Visual Basic, VBA, C, or C++. This allows Femap to become a powerful integration program for third party solutions (Excel, Word, Matlab, SolidEdge, Catia, ... ) and significantly increases the portability of data into and out of the program. Many useful programs are delivered with Femap in an ever expanding library that can be found in the Custom Tools toolbar. Code is provided! 3

  4. Overview - Femap API Our goal is to use Femap and its API to eventually automate the model development process, reducing the time by half through the use of templates, automation and improved access to CAD information. Glenn Harris, EADS Astrium Satellites UK 4

  5. API vs Program Files As well as the API, Femap also offers a macro capability (program) that allows a series of commands to be recorded, edited and debugged, and played back. This way, you can create custom programs that automate repetitive tasks. Common usages: Repetitive sequences of commands can be recorded and played back. Program File macros are easily created by the non-programming engineers. Program files can be modified to accept user input and executed from API scripts. 5

  6. Why use API? Ultimately, this is what we want: but we all know that this is utopic. 6

  7. Why use API? Real benefits: Automate routine tasks Interact with model data in ways that are not natively available Provide canned analysis routines Ensure consistency in analysis methods between engineers by providing a consistent method Enhance the functionality of FEMAP by creating add-in applications Automate generation of analysis reports Reduce the learning curve for newer users Integrate FEMAP with existing methods Modify results data Create nodes from a CSV file Create a custom meshing algorithm FEMAP Add-ins can also be created that behave like standard dockable panes 7

  8. API Programming Interface Full-featured BASIC programming environment inside the UI IntelliSense function descriptor auto completion Step through interactive program debugging Syntax Highlighting Object Browser Debugging Debugging Additional toolbar 8

  9. API Programming Interface Full-featured BASIC programming environment inside the UI Custom User Dialogs Editor 9

  10. Type Library 10

  11. Ressources Custom Tools Element Update Grouping Meshing PostProcessing 11

  12. Resources Custom Tools All Custom Tool commands are documented in FemapInstallDir/pdf/CustomTools.pdf Most useful tools Element Update - Divide Beam Grouping - Group expand Meshing - Hole to Hole Fastener Model Query - Multi Dependent Rigid Check PostProcessing - Nodes Move by Deform with Options View - View Swap 12

  13. Resources Custom Tools All Custom Tool commands are documented in FemapInstallDir/pdf/CustomTools.pdf Meshing - Hole to Hole Fastener 13

  14. Resources - Custom Tools Model Query - Multi Dependent Rigid Check 14

  15. Resources Help and Examples FEMAP API Reference Manual found in Help->Programming or <FEMAP ROOT>/pdf/api.pdf Include basic examples of API programs 15

  16. Demo 1 Create User commands Keyboard shortcuts New toolbar and button 16

  17. Demo 2 Drive Femap data from Excel Extract material and property data from Femap to Excel, update/calculate/validate values in Excel, then upload back to Femap 17

  18. Example 1 Path Length calculation on an antenna dish Path Length = (Ai+Bi+C) (Ai'+Bi'+C') B A Results sent to Excel C Over 230 cases Multi angles Different Operating Conditions 5BG .op2 file size 24 different paths 18

  19. Example 2 Calculate in-plane displacements "Fridge door" open panel case In-plane displacement resultant calculated for nodes on door opening 19

  20. Example 2 Calculate in-plane displacements 1 4 2 3 20

  21. Maya User Tools 21

  22. Summary API Overview vs Program File Interface Resources - Custom Tools The API lets you customize FEMAP to meet your specific needs 3 day API training available 22

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#