Anda di halaman 1dari 78

FEMAP

Custom Tools

Version 11.3.2
Proprietary and Restricted Rights Notice

This software and related documentation are proprietary to Siemens Product Lifecycle Management Software Inc.
© 2014 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.
Siemens and the Siemens logo are registered trademarks of Siemens AG. NX is a trademark or registered trademark
of Siemens Product Lifecycle Management Software Inc. or its subsidiaries in the United States and in other coun-
tries. All other trademarks, registered trademarks or service marks belong to their respective holders.

Siemens PLM

Web: http://www.femap.com

Customer Support

Phone: (714) 952-5444, (800) 955-0000 (In US & Canada)

Web: http://support.ugs.com

The following copyright refers only to the “bmp2raster.exe” executable distributed with FEMAP:
NeuQuant Neural-Net Quantization Algorithm
Copyright (c) 1994 Anthony Dekker
NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994.
See "Kohonen neural networks for optimal colour quantization" in "Network: Computation in Neural Systems"
Vol. 5 (1994) pp 351-367 for a discussion of the algorithm.
See also http://members.ozemail.com.au/~dekker/NEUQUANT.HTML
Any party obtaining a copy of these files from the author, directly or indirectly, is granted, free of charge, a full and
unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive right and license to deal in this software
and documentation files (the "Software"), including without limitation the rights to use, copy, modify, merge, pub-
lish, distribute, sublicense, and/or sell copies of the Software, and to permit persons who receive copies from any
such party to do so, with the only requirement being that this copyright notice remain intact.
Conventions
This manual uses different fonts to highlight command names or input that you must type.

a:setup Shows text that you should type.

OK, Cancel Shows a command name or text that you will see in a
dialog box.

Throughout this manual, you will see references to Windows. Windows refers to Microsoft® Windows XP, Win-
dows Vista, Windows 7, Windows 8, and Windows 8.1 (32-bit and 64-bit versions). You will need one of these
operating environments to run FEMAP for the PC. This manual assumes that you are familiar with the general use
of the operating environment. If you are not, you can refer to the Windows User’s Guide for additional assistance.
Similarly, throughout the manual all references to FEMAP, refer to the latest version of our software.
Table of Contents TOC-1

Table of Contents

Proprietary and Restricted Rights Notice


Table of Contents
1. Introduction
1.2 Accessing the Custom Tools Menu . . . . . . . . . . . . . . . . . 1-2
1.3 Setting the Location of the Custom Tools Application Files . . . . . . . . . . . . 1-4
1.3.1 FEMAP Preference for the Custom Tools Path . . . . . . . . . . . . . 1-4
1.4 Customizing the Custom Tools Toolbar Menu. . . . . . . . . . . . . . . 1-5
1.4.1 Example of Adding a Program File to the Custom Tools menu . . . . . . . . . . 1-5
2. Custom Tools > Data Table
2.1 Add Corner Thickness . . . . . . . . . . . . . . . . . . . 2-1
2.2 AddNodesandDisplacementstoDataTable . . . . . . . . . . . . . . . 2-2
2.3 Cross Section Dimensions to Data Table . . . . . . . . . . . . . . . . 2-2
2.4 Get Change Column Width . . . . . . . . . . . . . . . . . . 2-2
2.5 Output Max Min Across Sets . . . . . . . . . . . . . . . . . . 2-3
2.6 Show Hide Columns By Type . . . . . . . . . . . . . . . . . . 2-3
3. Custom Tools > Element Update
3.1 AlignSolidElemCsysToSurfaceTangents . . . . . . . . . . . . . . . . 3-2
3.2 Beams Normal to Surface . . . . . . . . . . . . . . . . . . . 3-2
3.3 Choose Separate Colors for RBE2s and RBE3s . . . . . . . . . . . . . . 3-2
3.4 Color Elements to Match Property . . . . . . . . . . . . . . . . . 3-3
3.5 Color Elements to Match Solids . . . . . . . . . . . . . . . . . 3-3
3.6 Color Elements to Match Surfaces . . . . . . . . . . . . . . . . . 3-3
3.7 Convert RBE2s to RBE3s. . . . . . . . . . . . . . . . . . . 3-3
3.8 Convert Rigid to Active Beam . . . . . . . . . . . . . . . . . . 3-3
3.9 Divide Beams . . . . . . . . . . . . . . . . . . . . . 3-3
3.10 Entity Reorient . . . . . . . . . . . . . . . . . . . . 3-3
3.11 Orient Material Angle Tangent to Curve . . . . . . . . . . . . . . . 3-4
3.12 RenumberNodesAndElements . . . . . . . . . . . . . . . . . 3-5
3.13 Set Separate Colors for RBE2s and RBE3s . . . . . . . . . . . . . . . 3-5
3.14 Split Linear Quad and Hex Elements with Plane . . . . . . . . . . . . . . 3-5
3.15 Update Material Angle using Delta Value . . . . . . . . . . . . . . . 3-5
4. Custom Tools > Event Callback
4.1 callback . . . . . . . . . . . . . . . . . . . . . . 4-1
4.2 Startloop . . . . . . . . . . . . . . . . . . . . . . 4-1
5. Custom Tools > Examples
5.1 FEMAP Functions To Excel . . . . . . . . . . . . . . . . . . 5-1
5.2 Read Airfoil . . . . . . . . . . . . . . . . . . . . . 5-2
5.3 Using Text. . . . . . . . . . . . . . . . . . . . . . 5-2
6. Custom Tools > File Processing
6.1 Custom Tools, File Processing, Import Inventor . . . . . . . . . . . . . . 6-1
7. Custom Tools >
GeometryProcessing
7.1 Break Curves at Middle . . . . . . . . . . . . . . . . . . . 7-1
7.2 Create Points At Nodes . . . . . . . . . . . . . . . . . . . 7-1
7.3 Extrude Multiple Surfaces . . . . . . . . . . . . . . . . . . 7-2
7.4 Find Tangent Surfaces . . . . . . . . . . . . . . . . . . . 7-2
7.5 Free Edges of Sheets to Groups . . . . . . . . . . . . . . . . . 7-3
7.6 MidSurface Clean Stitch Color and Delete . . . . . . . . . . . . . . . 7-3
7.7 Move Workplane Tangent to Curve . . . . . . . . . . . . . . . . . 7-3
7.8 SliceSolidsUpdateLayersAndGroups . . . . . . . . . . . . . . . . 7-3
7.9 Solid Align Csys . . . . . . . . . . . . . . . . . . . . 7-3
TOC-2 Table of Contents

8. Custom Tools > Grouping


8.1 Element Group Expand. . . . . . . . . . . . . . . . . . . 8-1
8.2 Export Groups to Patran Session File . . . . . . . . . . . . . . . . 8-1
8.3 Generate groups with solid names . . . . . . . . . . . . . . . . 8-1
8.4 Geometry Group Expand . . . . . . . . . . . . . . . . . . 8-2
8.5 Group Elem Surface . . . . . . . . . . . . . . . . . . . 8-2
8.6 Group From Displayed Groups . . . . . . . . . . . . . . . . . 8-2
8.7 Group Matching Thickness . . . . . . . . . . . . . . . . . . 8-2
8.8 Group Nodes on Surface . . . . . . . . . . . . . . . . . . 8-2
8.9 GroupRigidIndependentNodes . . . . . . . . . . . . . . . . . 8-2
8.10 GroupSurfacesWithSelectedRadius . . . . . . . . . . . . . . . . 8-2
8.11 Import Groups From Patran Session File . . . . . . . . . . . . . . . 8-2
8.12 Property to Layers . . . . . . . . . . . . . . . . . . . 8-3
8.13 Removed Solids From Group Based On ID . . . . . . . . . . . . . . 8-3
8.14 Renumber Groups Alphabetically . . . . . . . . . . . . . . . . 8-3
9. Custom Tools >
HoneyComb PSHELL >
HoneyComb PShell Property
9.1 HoneyComb PShell Property . . . . . . . . . . . . . . . . . 9-2
10. Custom Tools >
Import then Connect Startup
10.1 Import Connect . . . . . . . . . . . . . . . . . . . . 10-1
11. Custom Tools > Load Processing
11.1 Bearing Load on Curves in Active Load Set . . . . . . . . . . . . . . 11-2
11.2 Bearing Load on Curves in New Load Set . . . . . . . . . . . . . . . 11-2
11.3 Bearing Load on Surfaces in Active Load Set . . . . . . . . . . . . . . 11-2
11.4 Bearing Load on Surfaces in New Load Set . . . . . . . . . . . . . . 11-2
11.5 Solid Face Loading with Equation . . . . . . . . . . . . . . . . 11-2
11.6 Load Processing, Temp Grad in X . . . . . . . . . . . . . . . . 11-2
11.7 Load Processing, Temp Grad in y . . . . . . . . . . . . . . . . 11-2
11.8 Temp Grad in Z . . . . . . . . . . . . . . . . . . . . 11-3
12. Custom Tools > Meshing
12.1 Auto Boundary Faces With Poles, Auto Boundary Faces With Poles . . . . . . . . . 12-2
12.2 Auto Boundary Faces With Poles, Select Auto Boundary Faces With Poles . . . . . . . . 12-2
12.3 Combine and Mesh Surface with One Curve . . . . . . . . . . . . . . 12-2
12.4 Combine and Mesh Surfaces . . . . . . . . . . . . . . . . . 12-3
12.5 Compression Only Gaps . . . . . . . . . . . . . . . . . . 12-3
12.6 Connect Nodes on Surfaces with Rigid Elements . . . . . . . . . . . . . 12-3
12.7 Copy Nodes with Increment . . . . . . . . . . . . . . . . . 12-3
12.8 Create Grounded CBUSH Elements . . . . . . . . . . . . . . . . 12-3
12.9 Hole to Hole Fastener . . . . . . . . . . . . . . . . . . . 12-3
12.10 Merge All Nodes . . . . . . . . . . . . . . . . . . . 12-4
12.11 Move Merge Nodes . . . . . . . . . . . . . . . . . . . 12-4
12.12 Multi DOF Springs from single DOF Spring . . . . . . . . . . . . . . 12-4
12.13 Multi Mass Elements . . . . . . . . . . . . . . . . . . 12-5
12.14 Multi Single Node Elements . . . . . . . . . . . . . . . . . 12-5
12.15 ShowBadTetras . . . . . . . . . . . . . . . . . . . . 12-5
12.16 Show Worst Element . . . . . . . . . . . . . . . . . . 12-5
12.17 Spider Curves . . . . . . . . . . . . . . . . . . . . 12-5
12.18 Spider Nodes . . . . . . . . . . . . . . . . . . . . 12-6
12.19 Spider Surfaces . . . . . . . . . . . . . . . . . . . . 12-6
12.20 Spider . . . . . . . . . . . . . . . . . . . . . 12-6
12.21 Weld-Fastener Element Check . . . . . . . . . . . . . . . . . 12-6
12.22 Weld-Fastener Element Generator . . . . . . . . . . . . . . . . 12-7
13. Custom Tools > Model Query
13.1 CBUSH Csys Display Reset . . . . . . . . . . . . . . . . . 13-2
13.2 CBUSH Csys Display Reset with Message Box . . . . . . . . . . . . . 13-2
13.3 CBUSH Csys Display. . . . . . . . . . . . . . . . . . . 13-2
13.4 Distortion to Output Vectors for 10 . . . . . . . . . . . . . . . . 13-2
13.5 Distortion to Output Vector . . . . . . . . . . . . . . . . . 13-2
13.6 Element Count by Type and Group . . . . . . . . . . . . . . . . 13-2
Table of Contents TOC-3

13.7 Element Count by Type . . . . . . . . . . . . . . . . . . .13-2


13.8 Group Elements with No Material Angle Defined . . . . . . . . . . . . . .13-2
13.9 Group Shell Elements with No Material Angle Defined . . . . . . . . . . . .13-2
13.10 GroupShowAllConnectedElements . . . . . . . . . . . . . . . .13-3
13.11 Highlight Tria3s . . . . . . . . . . . . . . . . . . . .13-3
13.12 LSDyna_Time_Step_Calculator . . . . . . . . . . . . . . . . .13-3
13.13 Model Contents . . . . . . . . . . . . . . . . . . . .13-4
13.14 Multi Dependent Rigid Check . . . . . . . . . . . . . . . . .13-4
13.15 ShowConnectedElems . . . . . . . . . . . . . . . . . . .13-4
14. Custom Tools > Node Update
14.1 Create Nodes Project Nodes Onto Curve.BAS . . . . . . . . . . . . . .14-1
14.2 Move Nodes Normal To Curve . . . . . . . . . . . . . . . . .14-1
15. Custom Tools > PostProcessing
15.1 ASME Stress Intensity Calculator . . . . . . . . . . . . . . . . .15-2
15.2 Bar Get Output Data . . . . . . . . . . . . . . . . . . .15-2
15.3 Beam List Axial and Total Shear . . . . . . . . . . . . . . . . .15-2
15.4 Calculate Factor of Safety for Solid Elements . . . . . . . . . . . . . .15-2
15.5 Calculate Mid Plate Stresses . . . . . . . . . . . . . . . . . .15-2
15.6 Calculate Mid Plate Stresses_Results Browsing Object. . . . . . . . . . . . .15-2
15.7 Cycle Plate Stress Output Vectors . . . . . . . . . . . . . . . . .15-2
15.8 GROUP_POST_FNO . . . . . . . . . . . . . . . . . . .15-2
15.9 Laminate Envelope Failure Indices . . . . . . . . . . . . . . . .15-2
15.10 Laminate Max Fiber Strain . . . . . . . . . . . . . . . . . .15-3
15.11 Laminate Next Ply . . . . . . . . . . . . . . . . . . .15-3
15.12 Laminate Next Ply_with Global Ply . . . . . . . . . . . . . . . .15-3
15.13 Laminate Prev Ply. . . . . . . . . . . . . . . . . . . .15-3
15.14 Laminate Prev Ply_with Global Ply . . . . . . . . . . . . . . . .15-3
15.15 Line Element Elongation From Displacements . . . . . . . . . . . . . .15-3
15.16 List Output to Excel . . . . . . . . . . . . . . . . . . .15-3
15.17 Nodes Move By Deform with Options . . . . . . . . . . . . . . . .15-3
15.18 Nodes Move By Deform . . . . . . . . . . . . . . . . . .15-4
15.19 RealVonMises_All Output Sets . . . . . . . . . . . . . . . . .15-4
15.20 RealVonMises_Select Sets . . . . . . . . . . . . . . . . . .15-4
15.21 Strain Energy Participation . . . . . . . . . . . . . . . . . .15-4
15.22 Sum Contact Grid Point Forces, Sum AdvNonlin Contact Force . . . . . . . . . .15-4
15.23 Sum Contact Grid Point Forces, Sum AdvNonlin Contact GPF On Connector . . . . . . . .15-4
15.24 Sum Contact Grid Point Forces, Sum Contact GPF On Connector . . . . . . . . . .15-4
15.25 Sum Contact Grid Point Forces, Sum Contact GPF . . . . . . . . . . . . .15-4
15.26 Tetra Adaptive Mesh and Rerun . . . . . . . . . . . . . . . . .15-4
15.27 Word Report Generator . . . . . . . . . . . . . . . . . .15-5
16. Custom Tools >
Solid Connection Tools
16.1 Isolate Solid . . . . . . . . . . . . . . . . . . . . .16-2
16.2 Make Solid Transparent . . . . . . . . . . . . . . . . . . .16-2
16.3 Mesh Solid . . . . . . . . . . . . . . . . . . . . .16-2
16.4 Reset All Surfaces . . . . . . . . . . . . . . . . . . . .16-2
16.5 Surface Color Fixup . . . . . . . . . . . . . . . . . . .16-2
17. Custom Tools >
Standard Analysis
17.1 modal analysis. . . . . . . . . . . . . . . . . . . . .17-1
17.2 static analysis . . . . . . . . . . . . . . . . . . . . .17-1
18. Custom Tools > Views
18.1 Snap to Closest Orthogonal View . . . . . . . . . . . . . . . . .18-2
18.2 Switch Background For Printing . . . . . . . . . . . . . . . . .18-2
18.3 View Color Swap . . . . . . . . . . . . . . . . . . . .18-2
18.4 View Free Edge Flip . . . . . . . . . . . . . . . . . . .18-2
19. Custom Tools > Visualization
19.1 FlyAroundPlayback . . . . . . . . . . . . . . . . . . .19-1
19.2 FlyAroundRecord . . . . . . . . . . . . . . . . . . . .19-1
19.3 FlyThroughAnimation . . . . . . . . . . . . . . . . . . .19-2
19.4 Plot Nodal Temp . . . . . . . . . . . . . . . . . . . .19-2
TOC-4 Table of Contents

19.5 Thickness To Output . . . . . . . . . . . . . . . . . . . 19-2


19.6 Total Laminate Thickness To Output . . . . . . . . . . . . . . . . 19-2
Introduction 1-1

1. Introduction

This section introduces the API scripts contained within the API folder in FEMAP.

1.1 Introduction to the Custom Tools API Scripts included


with FEMAP
FEMAP includes tools to automate repetitive and/or multi-step geometry, meshing and model editing workflows via the
Custom Tools toolbar menu in FEMAP. These tools were created using the Femap API and are located under the main
FEMAP installation folder under the api folder. The majority of these API automation tools are Basic Language.BAS
scripts, while the remaining are Microsoft visual Studio Basic compiled projects in the form of .exe files.
1-2 Introduction

1.2 Accessing the Custom Tools Menu


By default, the Custom Tools toolbar is activated the first time FEMAP is executed. If the Custom Tools menu is not acti-
vated in your FEMAP session, right-click your mouse on a command in the Main Menu bar or in an area outside of docked
tool bars and select Custom Tools from the pop-up menu as shown below. Note that activated tool bars will be displayed
with check box to the left of the toolbar name.
Introduction 1-3

The Custom Tools toolbar can also be activated or deactivated through the Tools, Toolbars command. When the Customize
dialog box is activated, click the Toolbars tab, then click the check box for the Custom Tools menu.
1-4 Introduction

1.3 Setting the Location of the Custom Tools Application


Files
The default location of the Custom Tools menu is the api folder under the main FEMAP installation folder. You can override
this by two (2) methods:
• Modify FEMAP’s preference for the location of the Custom Tools files.
• From the Custom Tools toolbar menu, select the Tools Directory command where you specify a folder where automation
files are located. Using this method will

1.3.1 FEMAP Preference for the Custom Tools Path


Select the FEMAP command, File, Preferences. Under the Library/Startup tab, click the Browse icon for Custom Tools
Path, and select a folder location where the custom tools are located. Note, only the files located under this folder and its
subfolders will be included in Custom Tools toolbar menu.
Introduction 1-5

1.4 Customizing the Custom Tools Toolbar Menu


You can add a file to be accessed from the Custom Tools toolbar menu.
Selecting the Add Tools command from the Custom Tools toolbar menu you to assign a *.exe; *.com; *.pif; *.bat; *.cmd;
*.pro; *.prg; *.bas file to the custom tools menu. Adding one of these files will copy the selected file to the folder designated
as the Custom Tools Path and the file name without its file extension will appear in the Custom Tools toolbar menu arranged
alphabetically as shown in the following example.

1.4.1 Example of Adding a Program File to the Custom Tools menu


In this example, a FEMAP Program File (.pro file extension) is desired to be added to the Custom Tools menu.
The steps are as follows:
• Select the command, Custom Tools, Add Tools
• Select the file to copy in the Select File to Copy to Custom Tools Directory dialog box. In this case, the file is located in
the C:\Femap\Automation\Program Files folder and is titled Create Load and Constraint Set.pro. The Open button is
clicked to confirm the selection.
1-6 Introduction

• When the Custom Tools menu is selected, the newly added program file has been added to this menu. Note that all files
added to the Custom Tools menu are arranged by alphabetically.
Custom Tools > Data Table 2-1

2. Custom Tools > Data Table

This section provides an overview of the Data Table API scripts under the Custom Tools, Data Table toolbar menu.

2.1 Add Corner Thickness


This script adds columns for the values of the corner thickness of elements included in the Data Table.
2-2 Custom Tools > Data Table

2.2 AddNodesandDisplacementstoDataTable
This API .bas script populates the Data Table with the X, Y, and Z coordinates and displacements of selected nodes.

2.3 Cross Section Dimensions to Data Table


This API .bas script sends the dimensions of cross-sections defined for Bar, Beam, and/or Curved Beam properties
to the Data Table.

2.4 Get Change Column Width


This API .bas script reduces the column widths of all displayed columns in the Data Table by a factor of 2.
Output Max Min Across Sets 2-3

2.5 Output Max Min Across Sets


This script requests the selection of Output Sets, Output Vectors, and elements for determining either the maximum
or the minimum values of the Output Vectors and their Element ID. This script does not generate enveloped output
sets and output vectors like the Model, Output, Process command.

2.6 Show Hide Columns By Type


This script will show all columns in the Data Table based upon the entity type displayed in the Data Table. For
nodes and elements, the active Output Set Output Vector results will be added. Values for Layers and Colors will be
hidden.
2-4 Custom Tools > Data Table
Custom Tools > Element Update 3-1

3. Custom Tools > Element Update

This section provides an overview of the API scripts used modify element property attributes, types and display
attributes under the Custom Tools, Element Update toolbar menu.
3-2 Custom Tools > Element Update

3.1 AlignSolidElemCsysToSurfaceTangents
This FEMAP API .bas script creates a Csys at the centroid of the selected element(s) aligned with the selected sur-
face U and V tangent directions at the projected element centroid. The Csys is used to create a Solid property with
its material angle aligned with the Csys.

3.2 Beams Normal to Surface


This API .bas script aligns the selected beam Y-axes with the normal projected to the selected surface from the
beam centroid.
In this example, the beams are meshed with their Y-axes parallel to the global X-axis as shown below on the left.
When the script is run, all the beam elements are selected to be re-oriented to be normal to the green surface which
results in an updated model as shown below on the right.

3.3 Choose Separate Colors for RBE2s and RBE3s


This API .bas script modifies the color of allRBE2 and RBE3 elements in the active model to the colors set by
pushing one or both of the Select RBE2 Color and/or Select RBE3 Color buttons. The color of the RBE2 ele-
ments will be changed only if the Select RBE2 Color button is pushed and the color of RBE3 elements will be
changed only if the Select RBE3 Color button is changed.
Color Elements to Match Property 3-3

3.4 Color Elements to Match Property


This API .bas script modifies all elements in a model to match the element property color. Does not change the
View Option for Element Color Mode.

3.5 Color Elements to Match Solids


This API .bas script modifies the color of solid elements in a model to match the color the solid associated with the
element. Does not change the View Option for Element Color Mode.

3.6 Color Elements to Match Surfaces


This API .bas script modifies the color of planar elements in a model to match the color the solid associated with
the element. Does not change the View Option for Element Color Mode.

3.7 Convert RBE2s to RBE3s


This API .bas script modifies selected RBE2 elements to RBE3 elements. This script does not remove any rota-
tional DOFs from the independent nodes on the converted RBE3 elements that previously existed when they were
dependent nodes on RBE2 elements.

3.8 Convert Rigid to Active Beam


This API .bas script converts selected rigid elements to the active beam property ID. If the active property is not a
beam, the script activates a message box informing the user to activate or create and activate a new beam property.

3.9 Divide Beams


This API .bas script converts splits a single selected beam element into the number of elements entered. The start
and end nodes of the original element are retained in their positions.

3.10 Entity Reorient


This API .bas script allows you to select one or more entities of a single type, reposition by selecting a initial posi-
tion plane and the final position plane. When an element is selected, all nodes on that element are repositioned as
well, which could effect any adjacent elements using those nodes.
3-4 Custom Tools > Element Update

3.11 Orient Material Angle Tangent to Curve


This API .bas script projects the centroid of the selected elements to the selected “leading” curve and uses the tan-
gent of the curve at that location as the material angle for that element. Elements are selected after the leading
curve.
This API has been updated for FEMAP v11 to display the material angle (View Option: Element - Material Direc-
tion) and prompt to reverse the angle if the curve direction is reversed from the desired material direction.
The Modify, Update Element, Material Orientation command has been updated in FEMAP v11 to provide the
same functionality as this API and includes the ability to select multiple curves as well as input a delta angle to the
tangent.
RenumberNodesAndElements 3-5

3.12 RenumberNodesAndElements
This API .bas script renumbers all nodes and elements in the active model by the selected order and coordinate sys-
tem.

3.13 Set Separate Colors for RBE2s and RBE3s


This API .bas script sets one color for all RBE2 and a single different color for all RBE3 elements in the model.

3.14 Split Linear Quad and Hex Elements with Plane


This API .bas script splits selected linear quad and hex elements with a user-specified plane. Elements whose exist-
ing nodes lie to close to the plane are ignored for splitting.

3.15 Update Material Angle using Delta Value


This API .bas script prompts the user to input a delta value of the material angle to be applied to the elements
selected. This script has been modified for FEMAP v11.1 to display the element material angle before selecting the
elements.
3-6 Custom Tools > Element Update
Custom Tools > Event Callback 4-1

4. Custom Tools > Event Callback

This section provides an overview of the Event Callback API scripts under the Custom Tools, Event Callbacks tool-
bar menu.

4.1 callback
This API .bas script checks for existence of variables (ITER, K, K1, K2, and PID) in the active FEMAP model file.
If these variables exist, an IF statement is run against K1 <= K <= K2. If the test passes and an active Analysis Set
exists in the FEMAP model, then the API script renames the active Analysis Set to the value of the callback
returned with the method App.feAppEventCallback (FEVENT_RESULTSEND, “”).

4.2 Startloop
This API .bas script checks for Shell properties in the active FEMAP model file, then prompts the user to enter a
starting value for the thickness of a selected Shell property, the ending value of the thickness and the number of
iterations from the stating to the ending value.
4-2 Custom Tools > Event Callback

The API uses the App.feAppEventCallback (FEVENT_RESULTSEND,path) call modifies the name of the analy-
sis set and result set as it iterates from the Starting Thickness to the Ending Thickness.
Custom Tools > Examples 5-1

5. Custom Tools > Examples

This Custom Tools API .bas scripts contain basic examples of using FEMAP’s API to develop custom applications.

5.1 FEMAP Functions To Excel


This API .bas script sends the data from selected FEMAP functions to an Excel Workbook. The data for each indi-
vidual function will be placed on an individual Worksheet, with the title of the Worksheet matching the Function
Title. In addition, there is a macro-enabled Excel file, “Excel Data To FEMAP Functions.xlsm”, which is located in
the API/Examples directory. This macro-enabled Excel file may be used to automatically create FEMAP functions
from when the data is entered in the specified format.
5-2 Custom Tools > Examples

5.2 Read Airfoil


This API .bas script reads a text file containing X and Y coordinates of an airfoil shape and creates points on the
workplane using the X and Y coordinates in the supplied text file.
This example uses the FEMAP API object Read and the fileRead file read method.

5.3 Using Text


This API .bas creates a text object with the Node ID at the location of the selected node.
Custom Tools > File Processing 6-1

6. Custom Tools > File Processing

6.1 Custom Tools, File Processing, Import Inventor


This API .bas script is an example of calling an external program from within Femap to process files. In this case,
the Autodesk Inventor Apprentice Object Library is used to open an Inventor file, export it as an ACIS .sat file,
then import it into the active Femap model file. In order to run this API, the Autodesk Inventor viewer is required
to be installed on the PC that this script is run on.
6-2 Custom Tools > File Processing
Custom Tools > GeometryProcessing 7-1

7. Custom Tools >


GeometryProcessing

These Custom Tools API scripts provide tools to automate FEMAP geometry creation and editing operations.

7.1 Break Curves at Middle


This FEMAP API .bas script breaks curves at the midpoint of selected curve(s).

7.2 Create Points At Nodes


This FEMAP API .bas script create a point at every selected node.
7-2 Custom Tools > GeometryProcessing

7.3 Extrude Multiple Surfaces


This FEMAP API .bas script is similar to the Geometry, Solid, Extrude command, except that multiple surfaces
can be selected to extrude along a user-defined vector and distance in a single operation. Surfaces selected are
retained, while the surfaces selected to be extruded are extruded into separate solids.

7.4 Find Tangent Surfaces


This FEMAP API .bas script is used to find a chain of tangent surfaces by selecting a single starting surface. The
color of tangent surfaces are colored red. Tangent surfaces must be on the same solid as the selected surface.

Resulting model with red surfaces indicating surfaces continuously tangent to the selected surface.
Free Edges of Sheets to Groups 7-3

7.5 Free Edges of Sheets to Groups


This FEMAP API .bas script creates a group containing the free edges of all sheet solids in the active FEMAP
model file.

7.6 MidSurface Clean Stitch Color and Delete


This FEMAP API .bas script creates generates and stitches mid-surfaces from a selected solid. The original solid is
automatically deleted.

7.7 Move Workplane Tangent to Curve


This FEMAP API .bas script sets the origin of the workplane at the start point of the selected curve and the work-
plane X-axis aligned with the tangent of the curve at its start point. The workplane Y-axis is aligned with the vector
cross product of the curve tangent vector and the perpendicular to a vector defined by the curve start and end
points.

7.8 SliceSolidsUpdateLayersAndGroups
This FEMAP API .bas script slices a selected solid with a user-specified plane, and assigns the resulting solids to
the selected solid’s layer and group(s)

7.9 Solid Align Csys


This FEMAP API .bas script transforms a selected solid from a selected coordinate system to a another selected
coordinate system. The “from” coordinate system is also transformed.
7-4 Custom Tools > GeometryProcessing

After selecting the “from” and “to” coordinate systems are selected and the bracket is selected, the “from” and the
bracket are transformed as shown below.
Custom Tools > Grouping 8-1

8. Custom Tools > Grouping

These Custom Tools API scripts provide tools to automate FEMAP Group rule modifications.

8.1 Element Group Expand


This FEMAP API .bas script uses elements in the active group and adds all adjacent elements. Nodes attached to
the elements are also added to the group.

8.2 Export Groups to Patran Session File


This FEMAP API .bas script creates a Patran session file that generates groups and group rules duplicating the
selected FEMAP groups ID(s), title(s) and element and node IDs in the group(s).

8.3 Generate groups with solid names


This FEMAP API .bas script generates a group for every solid in the active FEMAP model file including its related
entities.
8-2 Custom Tools > Grouping

8.4 Geometry Group Expand


This FEMAP API .bas script adds adjacent surfaces using curves attached to the existing surfaces in the active
group. Curves on the adjacent surfaces are also added to the group.

8.5 Group Elem Surface


This FEMAP API .bas script adds any surface to the active group associated to a selected element.

8.6 Group From Displayed Groups


This FEMAP API .bas script creates combines displayed groups into a new group.

8.7 Group Matching Thickness


This FEMAP API .bas script creates a new group containing elements with a thickness value equal to the thickness
of a selected property. Works only for plate or plane strain elements.

8.8 Group Nodes on Surface


This FEMAP API .bas script creates a new group containing nodes on a selected surface.

8.9 GroupRigidIndependentNodes
This FEMAP API .bas script appends to the active group, or creates a new group of independent node(s) on rigid
element(s) in the active FEMAP model file.

8.10 GroupSurfacesWithSelectedRadius
This FEMAP API .bas script creates a group of cylindrical surfaces with a user-specified radius.

8.11 Import Groups From Patran Session File


This FEMAP API .bas script can create a new group or update an existing group by reading geometric and/or finite
elements entities from a Patran session file (*.ses file). When used, the following dialog box will be displayed:

In the Session File section, use the Select File button to select the Patran Session File (*.ses file) using a “Standard
Windows Select File” dialog box.
Property to Layers 8-3

The Options section has three sections: Group Geometry, Group Finite Elements, and the Verbose option.
Group Geometry - choose to import Points, Curves, and/or Surfaces by checking the appropriate check boxes.
Click the All On button to enable all three entity types or All Off to disable all three entity types.
Group Finite Elements - choose to import Nodes and/or Elements/MPCs by checking the appropriate check
boxes. Click the All On button to enable both entity types or All Off to disable both entity types.
Verbose option - when enabled, will issue messages as each new group is created or each existing group is
updated, along with any error messages. When disabled, only error messages will be issued.

8.12 Property to Layers


This FEMAP API .bas script creates a new layer for every property in the active FEMAP model file and modifies
the elements with that property to the layer corresponding to the property.

8.13 Removed Solids From Group Based On ID


This FEMAP API .bas script removes selected solid(s) along with the solid’s surfaces, curves, points, and associ-
ated elements and nodes from the active group.

8.14 Renumber Groups Alphabetically


This FEMAP API .bas script renumbers groups beginning with ID = 90,000,000 by their title.
8-4 Custom Tools > Grouping
Custom Tools > HoneyComb PSHELL > HoneyComb PShell Property 9-1

9. Custom Tools >


HoneyComb PSHELL >
HoneyComb PShell Property

This FEMAP API .bas script follows the NASA FEMCI (Finite Element Modeling Continuous Improvement)
guidelines for representing a composite honeycomb sandwich with a NASTRAN PSHELL. For further information
on this method, go to http://femci.gsfc.nasa.gov/hcplate/index.html.
9-2 Custom Tools > HoneyComb PSHELL > HoneyComb PShell Property

9.1 HoneyComb PShell Property


This script requires that at least one material be available to create the PSHELL property. The following inputs are
required:
• Property Title
• Total Face Sheet Thickness (assumes that both the top and bottom sheets are the same thickness)
• Face Sheet Material - selected from a list of materials in the active FEMAP model
• Core Thickness
• Core Material - selected from a list of materials in the active FEMAP model
• Core Density (RHO)
HoneyComb PShell Property 9-3

The resulting PSHELL property results as follows given the data entries in the snapshot of the dialog box:
9-4 Custom Tools > HoneyComb PSHELL > HoneyComb PShell Property
Custom Tools > Import then Connect Startup 10-1

10. Custom Tools >


Import then Connect Startup

10.1 Import Connect


This FEMAP API .bas script is used as an example of calling FEMAP commands using the feRunCommand
method. This API script prompts for a Solid Edge part or assembly file then using the eFileProgramRun method,
a Program File activates the command, Connect, Automatic.
10-2 Custom Tools > Import then Connect Startup
Custom Tools > Load Processing 11-1

11. Custom Tools > Load Processing

These Custom Tools API scripts provide tools to automate FEMAP load creation.
11-2 Custom Tools > Load Processing

11.1 Bearing Load on Curves in Active Load Set


This FEMAP API .bas script prompts for curve(s), a cylindrical coordinate system and total load value, then creates
a nodal force load distributed by a sinusoidal equation. If the value of the load is less than zero (0), then the load on
the node is not created. The load is applied to the active load set. If no load set(s) exist, or none are active, a new
load set is created and activated.

11.2 Bearing Load on Curves in New Load Set


This FEMAP API .bas script is similar to the Custom Tools, Load Processing, Bearing Load on Curves in Active
Load Set, except that it always places the load in a new load set.

11.3 Bearing Load on Surfaces in Active Load Set


This FEMAP API .bas script prompts for surface(s), a cylindrical coordinate system and total load value, then cre-
ates a element pressure load distributed by a sinusoidal equation. If the value of the load is less than zero (0), then
the load on the element is not created. The load is applied to the active load set. If no load set(s) exist, or none are
active, a new load set is created and activated

11.4 Bearing Load on Surfaces in New Load Set


This FEMAP API .bas script is similar to the Custom Tools, Load Processing, Bearing load in active set, except
that it always places the load in a new load set.

11.5 Solid Face Loading with Equation


This FEMAP API .bas script is an example of finding the solid element faces attached to a selected surface using
the ElementFaces method. A convection load is applied to the element faces with an equation based on the position
of the element face centroid. This API script requires that an active load set be present in the active FEMAP model.

11.6 Load Processing, Temp Grad in X


This FEMAP API .bas script prompts for an initial temperature and a temperature gradient, or the change in tem-
perature over the extent of the mesh in the global X direction. These user-input values are used to apply a nodal
temperature load to all nodes in the model based on the delta-X from the lowest X-coordinate value of nodes to the
highest X-coordinate value of nodes in the model. This API script requires that an active load set be present in the
active FEMAP model.

11.7 Load Processing, Temp Grad in y


This FEMAP API .bas script prompts for an initial temperature and a temperature gradient, or the change in tem-
perature over the extent of the mesh in the global Y direction. These user-input values are used to apply a nodal
temperature load to all nodes in the model based on the delta-Y from the lowest Y-coordinate value of nodes to the
Temp Grad in Z 11-3

highest Y-coordinate value of nodes in the model. This API script requires that an active load set be present in the
active FEMAP model.

11.8 Temp Grad in Z


This FEMAP API .bas script prompts for an initial temperature and a temperature gradient, or the change in tem-
perature over the extent of the mesh in the global Z direction. These user-input values are used to apply a nodal
temperature load to all nodes in the model based on the delta-Z from the lowest Z-coordinate value of nodes to the
highest Z-coordinate value of nodes in the model. This API script requires that an active load set be present in the
active FEMAP model.
11-4 Custom Tools > Load Processing
Custom Tools > Meshing 12-1

12. Custom Tools > Meshing

These Custom Tools API scripts provide tools to automate FEMAP meshing.
12-2 Custom Tools > Meshing

12.1 Auto Boundary Faces With Poles, Auto Boundary Faces With
Poles
This FEMAP API .bas script finds all surfaces with poles and applies the feBoundaryFromSurfaces method to
those surfaces.

12.2 Auto Boundary Faces With Poles, Select Auto Boundary Faces
With Poles
This FEMAP API .bas script is similar to Custom Tools, Auto Boundary Faces With Poles, Auto Boundary Faces
With Poles, except that the user selects the surfaces to check for poles.

12.3 Combine and Mesh Surface with One Curve


This FEMAP API .bas script prompts for the selection of one or more curves. These curves are used to select the
surfaces attached to the curves, and then combines them into a single boundary surface using the
feBoundaryFromSurfaces API function.
The original mesh on the surfaces attached to the curve(s) is deleted and the resulting boundary surface is meshed.
The curves selected must all be part of a contiguous set of surfaces, if not, the API script will flag and error and exit
without making any changes to the model.
Combine and Mesh Surfaces 12-3

12.4 Combine and Mesh Surfaces


This FEMAP API .bas script is similar to Custom Tools, Meshing, Combine and Mesh Surface with One Curve,
except that the user selects the surfaces to combine.

12.5 Compression Only Gaps


This FEMAP API .bas script prompts for a surface. Coincident nodes are generated at all node locations on the sur-
face. The coincident nodes have permanent constraints applied in all six (6) degrees of freedom.
A Coordinate System is created for each node location on the surface with its local X-axis in the direction of the
surface normal at the node location and a compression GAP element is generated from the surface node to the coin-
cident node.

12.6 Connect Nodes on Surfaces with Rigid Elements


This FEMAP API .bas script prompts for two (2) surfaces to be connected with rigid elements between the nodes
surfaces The connections will be from nodes on the surface with the lowest number of nodes to the closest node on
the other selected surface using the API feMeshClosestLink function.

12.7 Copy Nodes with Increment


This FEMAP API .bas script copies selected nodes along a user-selected vector direction and distance. The user
first inputs an increment from the original node number that is used to calculate the copied nodes’ IDs

12.8 Create Grounded CBUSH Elements


This FEMAP API .bas script prompts for an existing CBUSH (Spring/Damper) Property with an Orientation Csys
assigned.
Next, the user is prompted to selected node(s) and a coincident node is generated at each selected node location
with permanent constraints applied in all six (6) degrees of freedom. A CBUSH element is then generated for every
original node selected and its coincident node.

12.9 Hole to Hole Fastener


This FEMAP API .bas script generates a fastener represented by a beam element and rigid elements connecting the
ends of the beam to the start and end edges of the hole.
An active Material is required to run this script. The user is first prompted for curves at the start of the beam. These
curves must be arcs. The first curve’s radius is used to create a Beam property titled API Fastener and a “spider”
Rigid (RBE2) element with the independent node at the center of the nodes on the selected curves connected to the
nodes on the selected curves.
The used selects a second set of curves that is used to generate a second Rigid (RBE2) element. The independent
nodes on the two Rigid elements are used to generate a Beam element with the API Fastener property.
12-4 Custom Tools > Meshing

12.10 Merge All Nodes


This FEMAP API .bas scripts merges all coincident nodes in the model with a tolerance of .001.

12.11 Move Merge Nodes


This FEMAP API .bas scripts first prompts the user with option to either move the first selected node to the location
of a second selected node, or, merge the two selected nodes at the location of the centroid of the two selected nodes.

12.12 Multi DOF Springs from single DOF Spring


This FEMAP API .bas scripts prompts the user to select a single DOF Spring that is replaced with one or more
DOF springs with the specified DOF Degree(s) of Freedom and Stiffness(es).
The original DOF Spring property is replaced with the first DOF spring selected in the Specify DOFs and Stiffness
dialog box.
Multi Mass Elements 12-5

12.13 Multi Mass Elements


This FEMAP API .bas script creates a Mass element at every user-selected node using a user-selected Mass prop-
erty.

12.14 Multi Single Node Elements


This FEMAP API .bas script creates a Mass, Mass Matrix, Spring/Damper to Ground, or DOF Spring to Ground
element at every user-selected node using a user-selected Mass, Mass Matrix, Spring/Damper to Ground, or DOF
Spring to Ground property. The type property selected determines the type of elements which will be created.

12.15 ShowBadTetras
This FEMAP API .bas script checks for element distortion using the API feCheckElemDistortion function for any
elements with a Jacobian at or above a value of 0.7. Any elements exceeding this limit are placed into a distorted
element group and the distorted element group is highlighted in the graphics pane.

12.16 Show Worst Element


This FEMAP API .bas script checks for element distortion using the API feCheckElemDistortion function for any
elements with a Jacobian at or above a value of 0.7. Any elements exceeding this limit are placed into a distorted
element group and the element with the highest Jacobian value is centered and highlighted in the graphics pane.
This element’s ID and the value of the Jacobian are also listed in the Messages pane.

12.17 Spider Curves


This FEMAP API .bas script generates a Rigid (RBE2) element by creating the independent node at the centroid of
nodes on user-selected curves. The dependent nodes for the Rigid element are the nodes on the selected curves.
The same functionality exists in the Define Rigid Element dialog box by selecting the option for New Node at Cen-
ter.
12-6 Custom Tools > Meshing

12.18 Spider Nodes


This FEMAP API .bas script generates a Rigid (RBE2) element by creating the independent node at the centroid of
user-selected nodes. The dependent nodes for the Rigid element are the selected nodes.
The same functionality exists in the Define Rigid Element dialog box by selecting the option for New Node at Cen-
ter.

12.19 Spider Surfaces


This FEMAP API .bas script generates a Rigid (RBE2) element by creating the independent node at the centroid of
nodes on user-selected surfaces. The dependent nodes for the Rigid element are the nodes on the selected surfaces.
The same functionality exists in the Define Rigid Element dialog box by selecting the option for New Node at Cen-
ter.

12.20 Spider
This FEMAP API .bas script operates identically to the API script, Spider Nodes.

12.21 Weld-Fastener Element Check


This FEMAP API .bas script checks the validity of weld/fastener elements which have been created manually, via
the “Weld-Fastener Element Generator” script provided with FEMAP, or through another automated creation
method. This script attempts to determine if weld or fastener elements will cause a USER FATAL MESSAGE when
run in NX Nastran.
Essentially, the same code is also used by the “Weld-Fastener Element Generator” script when the Check for Failed
Elements option is enabled in the Locate - Select Weld/Fastener Location Method dialog box.
The Analysis Check dialog box contains three sections: Check Type, Failed Elements, and f06 File:

When Check Type is set to Nastran, the script parses through an *.f06 file and searches for specific text (a text
“string”) that identifies elements with “points” lying outside of the “patch” or elements with projections which
have “failed”. Examples of the text:

When Use Existing is selected in the f06 File section, the user will be prompted to select an existing *f06 file.
When Run New is selected in the f06 File section, the script creates a temporary Analysis Set, exports an input file,
then checks the corresponding *.f06 file for the text shown above.
When Check Type is set to Standard, the script identifies whether the model contains weld, fasteners, or both, then
uses a different “check” based on each distinct element type.
For welds, the script checks for “points lying outside of the patch” by generating eight FEMAP point entities along
the diameter of the weld on both ends, and uses the cross products and dot products of the element edges and point
locations to determine whether each point lies inside the “patch” boundaries. To check for “elements with failed
Weld-Fastener Element Generator 12-7

projections”, the API uses the previously stated method, but instead checks if the center of each weld “end” lies
within the “patch boundaries”.
For fasteners, the API compares the fastener diameter to the shortest distance between the “closest elements’” cen-
troids and edges, and “flags” the fastener if its diameter exceeds that of the “shortest distance”.
The Failed Elements section is used to determine what should be done with any elements which fail the selected
Check Type. By default, the script will simply List the failed elements, but there are also options to Show the failed
elements (highlight the elements in the graphics window) or both List/Show the elements. When Create Group(s) is
enabled, the elements which fail will be placed into newly created groups. When Delete Elements is enabled, the
element which fail will be deleted. If you have Check Type set to Nastran and have also chosen to delete failed ele-
ments, you may want to also turn on Iterate, which will keep running new check runs until no elements which fail
the Nastran checks for Weld and/or Fastener elements occur.

12.22 Weld-Fastener Element Generator


This FEMAP API .bas script generates weld/fastener elements between adjacent “patch” elements located through
user-entered coordinates.
The Locate - Select Weld/Fastener Location Method dialog box is divided into two sections: Weld/Fastener and
Weld/Fastener Location Method.

The Weld/Fastener section is simply used to select the type of elements which will be created, Weld elements or
Fastener elements.
The Weld/Fastener Location Method section allows selection of a method to determine weld or fastener locations,
along with some additional options. Any number of XYZ coordinates may be stored in a FEMAP Data Surface, an
Excel spreadsheet, or a CSV (Comma-Separated Values) file. When one of these location methods is used, an ele-
ment will be created for each valid location found in the selected Arbitrary 3-D Data Surface, *.xls file, or *.csv
file, respectively. To simply enter coordinates one-at-a-time, select Individual and the script will then later prompt
the you for a location using the standard coordinate definition dialog box.
Regardless of the Weld/Fastener Location Method selected and other options, you will always be prompted to
select a Material after clicking OK to the Locate - Select Weld/Fastener Location Method dialog box. When creat-
ing Welds, you will then be prompted for a Diameter. When creating Fasteners, the Fastener Property Parameters
dialog box also be displayed:

This dialog box allows you to specify values for Diameter, Mass, Structural Damping, KTX, KTY, KTZ, KRX, KRY,
and KRZ, along with a toggle to Use Material CSys, a drop-down to choose a Material CSys, and the Absolute tog-
gle. These values, other than Diameter, will be used for all fastener elements created by a single use of this script.
12-8 Custom Tools > Meshing

If using Data Surface, Excel, or CSV, the Use Column 4 Diameter Values option is available. When disabled, which
is the default, you will be prompted for a single diameter value which will be used for all elements. When enabled,
you will still be prompted for a diameter, which will be used as the “default”, but you may also specify a different
diameter in “Column 4” for each location.
When Use Column 4 Diameter Values is enabled, the Consolidate Properties option will become available. When
disabled, which is the default, a unique property will be created for each newly created element. When enabled, the
script will attempt to create as few new properties as possible, then apply them to the appropriate elements. Speci-
fying a 0.0 or an “empty cell” in “Column 4” of the corresponding file format will default the diameter to the value
specified in the Enter Diameters for CWELD/CFAST Element dialog box.
The Check for Failed Elements option, when enabled, will run through a process similar to the Weld-Fastener Ele-
ment Check API script, described above in 12.21 Weld-Fastener Element Check.
File formats:
Data Surface - Must be an Arbitrary 3-D Coordinates Data Surface. X, Y, and Z coordinates are entered into the X,
Y, and Z Location fields in the Define Arbitrary 3-D Coordinates Data Surface dialog box. Optionally, a diameter
for each location may be defined in the X Value field and will be used when the Use Column 4 Diameter Values
option is enabled.
Weld-Fastener Element Generator 12-9

Excel - Use the following format:

Optionally, a diameter for each location may be defined in “Column E” and will be used when the Use Column 4
Diameter Values option is enabled.
CSV - Use the following format:

Optionally, a diameter for each location may be defined in the 5th field and will be used when the Use Column 4
Diameter Values option is enabled.
How it works:
Using the user-specified coordinates, the script finds the closest “node” to that location, and adds all of the ele-
ments using that node to a Set object. Through the App.feMeasureDistance call, the program calculates the distance
between each element's centroid to the user-specified coordinate, and chooses the element with the shortest corre-
sponding distance as the first “patch” element for the weld/fastener. To find the adjacent “patch” element, the user-
entered coordinate is then projected in the direction of the “closest element's” normal vector, until it finds the next
“closest node”. The script repeats this process for choosing the “closest” element using the second “closest node”.
For weld elements, the script then uses Weld Type set to “3..Patch to Patch (ELPAT)” and specifies the two closest
elements' IDs as the corresponding “Elem IDs” for “Patch 1”and “Patch 2”. It uses the “Projection” location
method to orient the weld between the two patches.
12-10 Custom Tools > Meshing

For Fastener elements, the script uses Weld Type set to “7..Elem to Elem (CFAST, ELEM)” fastener type, and spec-
ifies the two closest elements' IDs as the corresponding “Elem IDs” for “Patch 1” and “Patch 2”. While it also uses
the “Projection” location method, the fastener element is always oriented along a line connecting the two elements'
centroids.
Custom Tools > Model Query 13-1

13. Custom Tools > Model Query

These Custom Tools API scripts provide tools to automate model display, output, Analysis Set editing and model
query and checking operations.
13-2 Custom Tools > Model Query

13.1 CBUSH Csys Display Reset


This FEMAP API .bas script deletes all GFXArrows used to display CBUSH coordinate systems generated by the
API script, CBUSH Csys Display.

13.2 CBUSH Csys Display Reset with Message Box


This FEMAP API .bas script prompts for the removal of GFXArrows used to display CBUSH coordinate systems
generated by the API script, CBUSH Csys Display.

13.3 CBUSH Csys Display


This FEMAP API .bas script generates GFXArrows to display the local coordinate system of all CBUSH elements
in the active Femap model.

13.4 Distortion to Output Vectors for 10


This FEMAP API .bas script creates an Output Set and Output Vectors with the results of element distortion check-
ing. The function, feGetElemDistortion.is used to run the FEMAP command, Tools, Check, Distortion.

13.5 Distortion to Output Vector


This FEMAP API .bas script creates an Output Set and Output Vectors with the results of element distortion check-
ing. The function, feGetElemDistortion.is used to run the FEMAP command, Tools, Check, Distortion.

13.6 Element Count by Type and Group


This FEMAP API .bas script prompts the user to select group(s) and lists the number of every element type in the
selected group(s). The list is displayed in the Model Info pane.

13.7 Element Count by Type


This FEMAP API .bas script lists the number of every element type in the model in the Model Info pane.

13.8 Group Elements with No Material Angle Defined


This FEMAP API .bas script prompts the user to select elements to check for no material angle. Any element with-
out a material angle are assigned to a new group titled Elements without Material Angle Defined.

13.9 Group Shell Elements with No Material Angle Defined


This FEMAP API .bas script prompts the user to select elements to check for no material angle. Shell elements
without a material angle are assigned to a new group titled Elements without Material Angle Defined.
GroupShowAllConnectedElements 13-3

13.10 GroupShowAllConnectedElements
This FEMAP API .bas script prompts the user to select a single element. All elements sharing nodes with the
selected element and adjacent elements are placed into a new group, All Mesh Connected to Elem nnn, where nnn is
the ID of the selected element. Connected elements are highlighted using the feViewShow function.

13.11 Highlight Tria3s


This FEMAP API .bas script highlights all 3-node triangular elements in the active model.

13.12 LSDyna_Time_Step_Calculator
This FEMAP API .bas script calculates the minimum time step required for a LS Dyna analysis.
13-4 Custom Tools > Model Query

13.13 Model Contents


This FEMAP API .bas script calculates and lists the number of data blocks used for the active Femap model file by
entity type. This script uses the feAppModelContents function.

13.14 Multi Dependent Rigid Check


This FEMAP API .bas script checks for redundant dependencies on RBE2 and RBE3 elements and lists any redun-
dancies in the Messages pane.

13.15 ShowConnectedElems
This FEMAP API .bas script is similar to the API script, GroupShowAllConnectedElements, except it only high-
lights the adjacent elements, and not all the elements connected. It also does not create a group of connected ele-
ments.
Custom Tools > Node Update 14-1

14. Custom Tools > Node Update

These Custom Tools API scripts provide tools to automate the creation and modification of nodes.

14.1 Create Nodes Project Nodes Onto Curve.BAS


This API .BAS script copies user-selected nodes and projects the copied nodes onto a selected curve.

14.2 Move Nodes Normal To Curve


This API .BAS script project prompts the user first for a curve to project towards, the nodes to move and a distance
to move the nodes along the vector from the original node location to the projected location on the curve.
14-2 Custom Tools > Node Update
Custom Tools > PostProcessing 15-1

15. Custom Tools > PostProcessing

These API scripts automate post-processing operations.


15-2 Custom Tools > PostProcessing

15.1 ASME Stress Intensity Calculator


This API .BAS script calculates mid-plane stresses for plate elements and ASME Stress Intensity values for plate,
beam and 8-node brick elements.
NOTE: If the model contains results for tetrahedral solid elements, those Output Vectors should be deleted before
running this script, otherwise an error will occur.

15.2 Bar Get Output Data


This API .BAS script list Bar element Bar tension and compression mean stresses.
This folder also includes a spreadsheet, Bar Get Output Data.xls, that fills spreadsheet cells with the same output
data as the API script. This Excel macro must be edited to reference the location of the Femap v11 type library,
femap.tlb.

15.3 Beam List Axial and Total Shear


This API .BAS script lists the axial force and calculates and lists the total shear force for each beam.

15.4 Calculate Factor of Safety for Solid Elements


This API .BAS script calculates the factor of safety for solid elements for a selected Output Set.

15.5 Calculate Mid Plate Stresses


This API .BAS script calculates mid-plane plate stresses and creates Output Vectors for mid-plane stresses in the
element X and Y directions. For a more complete set of Output Vectors, see Section 15.6 Calculate Mid Plate
Stresses_Results Browsing Object.

15.6 Calculate Mid Plate Stresses_Results Browsing Object


This API .BAS script uses the Results Browsing Object to calculate mid-plane plate stresses and creates Output
Vectors for mid-plane stresses in all selected output sets. This command provides more output vectors then Calcu-
late Mid Plate Stresses and should be significantly faster.

15.7 Cycle Plate Stress Output Vectors


This API .BAS turns on Double-Sided Planar Contours, then will “cycle” through four different stress vectors:
Plate Top/Bottom Max Shear Stress, Plate Top/Bottom Major Principle Stress, Plate Top/Bottom Minor Principle
Stress (Contour Legend is reversed), and Plate Top/Bottom Von Mises Stress.

15.8 GROUP_POST_FNO
This API .BAS script allows selection of a particular group for post-processing, then creates a new model file with
only the entities in the group (along with any entities needed to make a valid model in a new model) and attaches a
FEMAP Neutral File Output (FNO) file with the selected output.
After the group is selected, a copy of that group is made for temporary use and the “Group, Operations, Add
Related Entities” is run on that group (this group is later deleted by the script). This group is used to create a “valid”
model in the new FEMAP model. A FEMAP Neutral Output (FNO) File is then created containing the output sets
and output vectors selected using the Select Output to Export dialog box. From there, the script creates a new
model file in FEMAP with only the entities from the selected group and then attaches the FNO file to allow for
post-processing on those entities in the group.

15.9 Laminate Envelope Failure Indices


This API .BAS script envelopes the Laminate Ply Failure Indices for the active Output Set. Femap now automati-
cally creates Output Vector 6060..Laminate Max Failure Index, so the use of this API script is no longer required.
A sample Femap Neutral File, lam1.neu is included with results as and example model.
Laminate Max Fiber Strain 15-3

15.10 Laminate Max Fiber Strain


This API .BAS script calculates the maximum fiber stain for all laminate elements included in the active Output
Set. Strain results must exist in the active Output Set.
A sample Femap Neutral File, lam1.neu is included with results as and example model.

15.11 Laminate Next Ply


This API .BAS script sets the Output Vector to the next ply number with the output type. For example, if Lam Ply1
X Normal Stress is the current Output Vector, running this script sets the Output Vector to Lam Ply2 X Normal
Stress.

15.12 Laminate Next Ply_with Global Ply


This API .BAS script is very similar to Laminate Next Ply, but will go to the next Global Ply when reviewing
results on a Global Ply.

15.13 Laminate Prev Ply


This API .BAS script sets the Output Vector to the previous ply number with the output type. For example, if Lam
Ply2 X Normal Stress is the current Output Vector, running this script sets the Output Vector to Lam Ply1 X Normal
Stress.

15.14 Laminate Prev Ply_with Global Ply


This API .BAS script is very similar to Laminate Prev Ply, but will go to the previous Global Ply when reviewing
results on a Global Ply.

15.15 Line Element Elongation From Displacements


This API .BAS script computes new result vectors for Elongation, Elongation%, X Relative Deformation, Y Rela-
tive Deformation, and Z Relative Deformation for any selected line elements based on displacements from selected
output sets.

15.16 List Output to Excel


This API .BAS scripts populates a new Excel spreadsheet with results for selected elements for the selected Output
Vectors and Output Sets.

15.17 Nodes Move By Deform with Options


This API .bas script moves nodes by scaling X, Y and/or Z deformation values of the active Output Set.
15-4 Custom Tools > PostProcessing

15.18 Nodes Move By Deform


This API .BAS script moves nodes by the value of the X, Y, and Z deformation values of the active Output Set.

15.19 RealVonMises_All Output Sets


This API .bas script calculates equivalent Von Mises stresses for the top and bottom of plate elements and lists the
maximum and minimum values of the equivalent stresses and their corresponding element ID for all output sets in
the active FEMAP model. It is meant to be used for output from Frequency Response Analysis.

15.20 RealVonMises_Select Sets


This API .bas script calculates equivalent Von Mises stresses for the top and bottom of plate elements and lists the
maximum and minimum values of the equivalent stresses and their corresponding element ID for selected Output
Set(s). It is meant to be used for output from Frequency Response Analysis.

15.21 Strain Energy Participation


This API .bas script calculates the percent of Strain Energy for each selected Group(s) for every selected Output
Set. This should be applied to Normal Mode analysis output sets only.

15.22 Sum Contact Grid Point Forces, Sum AdvNonlin Contact Force
This API .bas script list the sum of contact forces on selected surfaces for the active Advanced Nonlinear Output
Set.

15.23 Sum Contact Grid Point Forces, Sum AdvNonlin Contact GPF
On Connector
This API .bas script lists the sum of contact force on selected connectors for the active Advanced Nonlinear Output
Set.

15.24 Sum Contact Grid Point Forces, Sum Contact GPF On Connec-
tor
This API .bas script lists the sum of Grid Point Forces for the nodes on selected connectors for the active Advanced
Nonlinear Output Set. Force Balance must be part of the Output Requests for the Advanced Nonlinear Analysis
Set.

15.25 Sum Contact Grid Point Forces, Sum Contact GPF


This API .bas script lists the sum of Grid Point Forces for the nodes on selected surfaces for the active Advanced
Nonlinear Output Set. Force Balance must be part of the Output Requests for the Advanced Nonlinear Analysis
Set.

15.26 Tetra Adaptive Mesh and Rerun


This API .bas script increases the mesh size on curves in areas by 40 percent (40%) where the difference between
the element centroid Von Mises stress and the maximum value of the Von Mises stress at any corner node exceeds
10 percent (10%). Curves that have mesh sizes revised are highlighted in the active view.
The active Output Set is deleted and the active Analysis Set is analyzed.
Word Report Generator 15-5

15.27 Word Report Generator


This API .BAS script generates a MS Word document with a summary of results for the active Output Set. The
report includes a header with data inputted by the user, and the following:
• Model File Information
• Screen snapshots of the deformed model with contour plots of Solid Von Mises stress and Total Deformation for the
active Output Set.
• Geometry Import Information: Solid ID, number of faces, total volume, and number of nodes and elements and the
Material ID of the mesh.
• Constraints: List of the constraints in the active Constraint Set.
• Mesh Information: Number of elements by type and total number of nodes
• Material Information: Listing of materials used in the model organized by ID. Each material’s E, , nu, and limit stress
values are also listed.
• Analysis Results Information all Elements/Materials: Node ID, value of maximum deformation in the model; Node ID
and value of the maximum nodal stress in the model; and, Element ID and value of the maximum Solid Von Mises.
• Analysis Results For Each Solids: Sorted by Solid ID, the Node ID and value of maximum deformation at that Node;
Node ID and the value of the maximum nodal stress at that node; and coordinates of the maximum Solid Von Mises
stress and Factor of Safety at that location.
• Analysis Results For Each Solid Material: Sorted by Material ID, the Node ID and value of the maximum nodal stress at
that node; the coordinates of the maximum Von Mises stress and the value at the location; and, the minimum Factor of
Safety for the material.
15-6 Custom Tools > PostProcessing
Custom Tools > Solid Connection Tools 16-1

16. Custom Tools >


Solid Connection Tools

These API scripts automate the setting of surface on solids transparency and colors.
16-2 Custom Tools > Solid Connection Tools

16.1 Isolate Solid


This API .BAS script prompts the user for a “Master” solid. Surface transparencies on the selected solid are
removed and all other surface transparencies are set to 70 percent (70%). In addition, all solids and surfaces, except
for the selected solid, are placed on the active model’s No Pick Layer.
Curves and points are not affected by this API script. Use the API script, Solid Connection Tools, Reset All Sur-
faces to reset surface transparencies and to reassign all Solids and Surfaces to the model’s Active Layer.

16.2 Make Solid Transparent


This API .BAS script sets the value of transparency of the surface on a selected solid to 70 percent (70%).

16.3 Mesh Solid


This API .BAS script tet meshes a selected solid using the default mesh size for the solid. This API script will gen-
erate a mesh on top of an existing mesh.

16.4 Reset All Surfaces


This API .BAS script resets all surface transparencies to zero (0) and moves all surface and solids to the model’s
Active Layer.

16.5 Surface Color Fixup


This API .BAS script sets all surface colors to the color of the solid they are attached to.
Custom Tools > Standard Analysis 17-1

17. Custom Tools >


Standard Analysis

These API scripts automate the generation of Analysis Sets and analyses.

17.1 modal analysis


This API .BAS script creates a new NX Nastran Normal Modes Analysis Set using the active Constraint Set. If no
active Constraint Set is specified, the user is prompted to activate a Constraint Set and the script terminates.

17.2 static analysis


This API .BAS script creates a new NX Nastran Static Analysis Set using the active Constraint and Load Sets. If no
active Constraint and/or Load Set is specified, the user is prompted to activate a Constraint and/or Load Set and the
script terminates.
17-2 Custom Tools > Standard Analysis
Custom Tools > Views 18-1

18. Custom Tools > Views

These API scripts automate...


18-2 Custom Tools > Views

18.1 Snap to Closest Orthogonal View


This API .BAS script sets the active Femap view to the orthogonal view closest to the active views current orienta-
tion.

18.2 Switch Background For Printing


This API .BAS script swaps the active View background color to a solid white background if the background is the
default Femap shaded background. If the active View’s background is other than the default Femap shaded back-
ground, the active View’s background is reset to the default Femap shaded background.

18.3 View Color Swap


This API .BAS script toggles an active View with a shaded background to solid white. If the active View’s back-
ground is solid, the view background is set to the Femap default shaded view background.

18.4 View Free Edge Flip


This API .BAS script toggles the active View between Free Edge and Hidden Line modes.
Custom Tools > Visualization 19-1

19. Custom Tools > Visualization

These API scripts automate the generation and contour plotting of model load and element thicknesses. In addition,
they can be used to “fly through the inside of a model” for visualization purposes.

19.1 FlyAroundPlayback
This API .BAS script allows you to playback recorded view manipulations which were recorded using the Custom
Tools, Visualization, FlyAroundRecord.bas API script. Simply enter the ID of recorded view manipulations.

19.2 FlyAroundRecord
This API .BAS script allows you to record view manipulations such as zoom, pan, and rotate and saves them with a
user-defined ID which can then be played back using the Custom Tools, Visualization, FlyAroundPlayback.bas
API script.
19-2 Custom Tools > Visualization

19.3 FlyThroughAnimation
This API .BAS script allows you view a model by following a selected curve for a specified number of steps. To
work, at least one curve must already exist in the model. The process is to select a curve, then specify magnification
and rotation, then specify a number of steps, then finally click OK. The animation will begin as soon as you click
OK when specifying the number of steps.

19.4 Plot Nodal Temp


This API .BAS script generates an Output Set with the nodal temperatures in the active Load Set and displays the
nodal temperatures as a Contour plot. The user is prompted to keep or delete the Output Set with the nodal tempera-
tures.

19.5 Thickness To Output


This API .BAS script generates a new Output Set with an Output Vector containing the element thickness of
selected 2D elements. This is similar to using the command, View, Advanced Post, Model Contour Data, except
that the user is prompted for the elements to generate the thickness values of and the thicknesses are not plotted.

19.6 Total Laminate Thickness To Output


This API .BAS script generates a new Output Set with an Output Vector containing the element thickness of
selected laminate elements. This is similar to using the command, View, Advanced Post, Model Contour Data,
except that the user is prompted for the elements to generate the thickness values of and the thicknesses are not
plotted.

Anda mungkin juga menyukai