Femap Custom Tools - · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset...

66
FEMAP Custom Tools Version 11.1.1

Transcript of Femap Custom Tools - · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset...

Page 1: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

FEMAPCustom Tools

Version 11.1.1

Page 2: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 3: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 4: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin
Page 5: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Table of Contents

Proprietary and Restricted Rights Notice Table of Contents1. Introduction

1.2 Accessing the Custom Tools Menu . . . . . . . . . . . . . . . . . 1-21.3 Setting the Location of the Custom Tools Application Files . . . . . . . . . . . . 1-4

1.3.1 FEMAP Preference for the Custom Tools Path . . . . . . . . . . . . . 1-41.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 Table2.1 Add Corner Thickness . . . . . . . . . . . . . . . . . . . 2-12.2 AddNodesandDisplacementstoDataTable . . . . . . . . . . . . . . . 2-22.3 Get Change Column Width . . . . . . . . . . . . . . . . . . 2-22.4 Output Max Min Across Sets . . . . . . . . . . . . . . . . . . 2-22.5 Show Hide Columns By Type . . . . . . . . . . . . . . . . . . 2-2

3. Custom Tools > Element Update3.1 AlignSolidElemCsysToSurfaceTangents . . . . . . . . . . . . . . . . 3-23.2 Beams Normal to Surface . . . . . . . . . . . . . . . . . . . 3-23.3 Choose Separate Colors for RBE2s and RBE3s . . . . . . . . . . . . . . 3-23.4 Color Elements to Match Property . . . . . . . . . . . . . . . . . 3-33.5 Color Elements to Match Solids . . . . . . . . . . . . . . . . . 3-33.6 Color Elements to Match Surfaces . . . . . . . . . . . . . . . . . 3-33.7 Convert RBE2s to RBE3s. . . . . . . . . . . . . . . . . . . 3-33.8 Convert Rigid to Active Beam . . . . . . . . . . . . . . . . . . 3-33.9 Divide Beams . . . . . . . . . . . . . . . . . . . . . 3-33.10 Entity Reorient . . . . . . . . . . . . . . . . . . . . 3-33.11 Orient Material Angle Tangent to Curve . . . . . . . . . . . . . . . 3-43.12 RenumberNodesAndElements . . . . . . . . . . . . . . . . . 3-53.13 Set Separate Colors for RBE2s and RBE3s . . . . . . . . . . . . . . . 3-53.14 Split Linear Quad and Hex Elements with Plane . . . . . . . . . . . . . . 3-53.15 Update Material Angle using Delta Value . . . . . . . . . . . . . . . 3-5

4. Custom Tools > Event Callback4.1 callback . . . . . . . . . . . . . . . . . . . . . . 4-14.2 Startloop . . . . . . . . . . . . . . . . . . . . . . 4-2

5. Custom Tools > Examples5.1 Examples, Read Airfoil . . . . . . . . . . . . . . . . . . . 5-25.2 Examples, Using Text . . . . . . . . . . . . . . . . . . . 5-2

6. Custom Tools > File Processing6.1 Custom Tools, File Processing, Import Inventor . . . . . . . . . . . . . . 6-1

7. Custom Tools >GeometryProcessing

7.1 Break Curves at Middle . . . . . . . . . . . . . . . . . . . 7-17.2 Create Points At Nodes . . . . . . . . . . . . . . . . . . . 7-17.3 Extrude Multiple Surfaces . . . . . . . . . . . . . . . . . . 7-27.4 Find Tangent Surfaces . . . . . . . . . . . . . . . . . . . 7-27.5 Free Edges of Sheets to Groups . . . . . . . . . . . . . . . . . 7-37.6 MidSurface Clean Stitch Color and Delete . . . . . . . . . . . . . . . 7-37.7 Move Workplane Tangent to Curve . . . . . . . . . . . . . . . . . 7-37.8 SliceSolidsUpdateLayersAndGroups . . . . . . . . . . . . . . . . 7-37.9 Solid Align Csys . . . . . . . . . . . . . . . . . . . . 7-3

8. Custom Tools > Grouping8.1 Element Group Expand . . . . . . . . . . . . . . . . . . . 8-18.2 Export Groups to Patran Session File . . . . . . . . . . . . . . . . 8-1

Page 6: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

TOC-2 Table of Contents

8.3 Generate groups with solid names . . . . . . . . . . . . . . . . 8-28.4 Geometry Group Expand . . . . . . . . . . . . . . . . . . 8-28.5 Group Elem Surface . . . . . . . . . . . . . . . . . . . 8-28.6 Group From Displayed Groups . . . . . . . . . . . . . . . . . 8-28.7 Group Matching Thickness . . . . . . . . . . . . . . . . . . 8-28.8 Group Nodes on Surface . . . . . . . . . . . . . . . . . . 8-28.9 GroupRigidIndependentNodes . . . . . . . . . . . . . . . . . 8-28.10 GroupSurfacesWithSelectedRadius . . . . . . . . . . . . . . . . 8-28.11 Property to Layers . . . . . . . . . . . . . . . . . . . 8-28.12 Removed Solids From Group Based On ID . . . . . . . . . . . . . . 8-28.13 Renumber Groups Alphabetically . . . . . . . . . . . . . . . . 8-2

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 Processing11.1 Bearing load in active load set . . . . . . . . . . . . . . . . . 11-211.2 Bearing load in new load set . . . . . . . . . . . . . . . . . 11-211.3 Solid Face Loading with Equation . . . . . . . . . . . . . . . . 11-211.4 Load Processing, Temp Grad in X . . . . . . . . . . . . . . . . 11-211.5 Load Processing, Temp Grad in y . . . . . . . . . . . . . . . . 11-211.6 Temp Grad in Z . . . . . . . . . . . . . . . . . . . . 11-2

12. Custom Tools > Meshing12.1 Auto Boundary Faces With Poles, Auto Boundary Faces With Poles . . . . . . . . . 12-112.2 Auto Boundary Faces With Poles, Select Auto Boundary Faces With Poles . . . . . . . . 12-212.3 Combine and Mesh Surface with One Curve . . . . . . . . . . . . . . 12-212.4 Combine and Mesh Surfaces . . . . . . . . . . . . . . . . . 12-212.5 Compression Only Gaps . . . . . . . . . . . . . . . . . . 12-212.6 Connect Nodes on Surfaces with Rigid Elements . . . . . . . . . . . . . 12-212.7 Copy Nodes with Increment . . . . . . . . . . . . . . . . . 12-312.8 Create Grounded CBUSH Elements . . . . . . . . . . . . . . . . 12-312.9 Hole to Hole Fastener . . . . . . . . . . . . . . . . . . . 12-312.10 Merge All Nodes . . . . . . . . . . . . . . . . . . . 12-312.11 Move Merge Nodes . . . . . . . . . . . . . . . . . . . 12-412.12 Multi DOF Springs from single DOF Spring . . . . . . . . . . . . . . 12-412.13 Multi Mass Elements . . . . . . . . . . . . . . . . . . 12-412.14 ShowBadTetras . . . . . . . . . . . . . . . . . . . . 12-512.15 Show Worst Element . . . . . . . . . . . . . . . . . . 12-512.16 Spider Curves . . . . . . . . . . . . . . . . . . . . 12-512.17 Spider Nodes . . . . . . . . . . . . . . . . . . . . 12-512.18 Spider Surfaces . . . . . . . . . . . . . . . . . . . . 12-512.19 Spider . . . . . . . . . . . . . . . . . . . . . 12-5

13. Custom Tools > Model Query13.1 CBUSH Csys Display Reset . . . . . . . . . . . . . . . . . 13-113.2 CBUSH Csys Display Reset with Message Box . . . . . . . . . . . . . 13-213.3 CBUSH Csys Display. . . . . . . . . . . . . . . . . . . 13-213.4 Distortion to Output Vectors for 10 . . . . . . . . . . . . . . . . 13-213.5 Distortion to Output Vector . . . . . . . . . . . . . . . . . 13-213.6 Element Count by Type and Group . . . . . . . . . . . . . . . . 13-213.7 Element Count by Type . . . . . . . . . . . . . . . . . . 13-213.8 Group Elements with No Material Angle Defined . . . . . . . . . . . . . 13-213.9 Group Shell Elements with No Material Angle Defined . . . . . . . . . . . . 13-213.10 GroupShowAllConnectedElements . . . . . . . . . . . . . . . . 13-313.11 Highlight Tria3s . . . . . . . . . . . . . . . . . . . 13-313.12 LSDyna_Time_Step_Calculator . . . . . . . . . . . . . . . . 13-313.13 Model Contents. . . . . . . . . . . . . . . . . . . . 13-413.14 Multi Dependent Rigid Check . . . . . . . . . . . . . . . . . 13-413.15 ShowConnectedElems . . . . . . . . . . . . . . . . . . 13-4

Page 7: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Table of Contents TOC-3

14. Custom Tools > Node Update14.1 Create Nodes Project Nodes Onto Curve.BAS . . . . . . . . . . . . . .14-114.2 Move Nodes Normal To Curve . . . . . . . . . . . . . . . . .14-1

15. Custom Tools > PostProcessing15.1 ASME Stress Intensity Calculator . . . . . . . . . . . . . . . . .15-115.2 Bar Get Output Data . . . . . . . . . . . . . . . . . . .15-215.3 Beam List Axial and Total Shear . . . . . . . . . . . . . . . . .15-215.4 Calculate Factor of Safety for Solid Elements . . . . . . . . . . . . . .15-215.5 Calculate Mid Plate Stresses . . . . . . . . . . . . . . . . . .15-215.6 GROUP_POST_FNO . . . . . . . . . . . . . . . . . . .15-215.7 Laminate Envelope Failure Indices . . . . . . . . . . . . . . . .15-215.8 Laminate Max Fiber Strain . . . . . . . . . . . . . . . . . .15-215.9 Laminate Next Ply . . . . . . . . . . . . . . . . . . . .15-215.10 Laminate Prev Ply. . . . . . . . . . . . . . . . . . . .15-215.11 Line Element Elongation From Displacements . . . . . . . . . . . . . .15-315.12 List Output to Excel . . . . . . . . . . . . . . . . . . .15-315.13 Nodes Move By Deform with Options . . . . . . . . . . . . . . . .15-315.14 Nodes Move By Deform . . . . . . . . . . . . . . . . . .15-315.15 RealVonMises_All Output Sets . . . . . . . . . . . . . . . . .15-315.16 RealVonMises_Select Sets . . . . . . . . . . . . . . . . . .15-315.17 Strain Energy Participation . . . . . . . . . . . . . . . . . .15-315.18 Sum Contact Grid Point Forces, Sum AdvNonlin Contact Force . . . . . . . . . .15-315.19 Sum Contact Grid Point Forces, Sum AdvNonlin Contact GPF On Connector . . . . . . . .15-315.20 Sum Contact Grid Point Forces, Sum Contact GPF On Connector . . . . . . . . . .15-415.21 Sum Contact Grid Point Forces, Sum Contact GPF . . . . . . . . . . . . .15-415.22 Tetra Adaptive Mesh and Rerun . . . . . . . . . . . . . . . . .15-415.23 Word Report Generator . . . . . . . . . . . . . . . . . .15-4

16. Custom Tools >Solid Connection Tools

16.1 Isolate Solid . . . . . . . . . . . . . . . . . . . . .16-216.2 Make Solid Transparent . . . . . . . . . . . . . . . . . . .16-216.3 Mesh Solid . . . . . . . . . . . . . . . . . . . . .16-216.4 Reset All Surfaces . . . . . . . . . . . . . . . . . . . .16-216.5 Surface Color Fixup . . . . . . . . . . . . . . . . . . .16-2

17. Custom Tools >Standard Analysis

17.1 modal analysis. . . . . . . . . . . . . . . . . . . . .17-217.2 static analysis . . . . . . . . . . . . . . . . . . . . .17-2

18. Custom Tools > Views18.1 Snap to Closest Orthogonal View . . . . . . . . . . . . . . . . .18-118.2 Switch Background For Printing . . . . . . . . . . . . . . . . .18-218.3 View Color Swap . . . . . . . . . . . . . . . . . . . .18-218.4 View Free Edge Flip . . . . . . . . . . . . . . . . . . .18-2

19. Custom Tools > Visualization19.1 Plot Nodal Temp . . . . . . . . . . . . . . . . . . . .19-219.2 Thickness To Output . . . . . . . . . . . . . . . . . . .19-219.3 Total Laminate Thickness To Output . . . . . . . . . . . . . . . .19-2

Page 8: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

TOC-4 Table of Contents

Page 9: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 10: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

1-2 Introduction

1.2 Accessing the Custom Tools MenuBy 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.

Page 11: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 12: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

1-4 Introduction

1.3 Setting the Location of the Custom Tools Application FilesThe 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 PathSelect 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.

Page 13: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Introduction 1-5

1.4 Customizing the Custom Tools Toolbar MenuYou 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 menuIn 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.

Page 14: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 15: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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 ThicknessThis script adds columns for the values of the corner thickness of elements included in the Data Table.

Page 16: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

2-2 Custom Tools > Data Table

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

2.3 Get Change Column WidthThis API .bas script reduces the column widths of all displayed columns in the Data Table by a factor of 2.

2.4 Output Max Min Across SetsThis 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.5 Show Hide Columns By TypeThis 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.

Page 17: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 18: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

3-2 Custom Tools > Element Update

3.1 AlignSolidElemCsysToSurfaceTangentsThis 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 SurfaceThis 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 RBE3sThis 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.

Page 19: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Color Elements to Match Property 3-3

3.4 Color Elements to Match PropertyThis 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 SolidsThis 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 SurfacesThis 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 RBE3sThis 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 BeamThis 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 BeamsThis 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 ReorientThis 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.

Page 20: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

3-4 Custom Tools > Element Update

3.11 Orient Material Angle Tangent to CurveThis 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.

Page 21: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

RenumberNodesAndElements 3-5

3.12 RenumberNodesAndElementsThis 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 RBE3sThis 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 PlaneThis 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 ValueThis 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.

Page 22: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

3-6 Custom Tools > Element Update

Page 23: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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 callbackThis 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, “”).

Page 24: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

4-2 Custom Tools > Event Callback

4.2 StartloopThis 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.

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.

Page 25: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

5. Custom Tools > Examples

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

Page 26: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

5-2 Custom Tools > Examples

5.1 Examples, Read AirfoilThis 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.2 Examples, Using TextThis API .bas creates a text object with the Node ID at the location of the selected node.

Page 27: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

6. Custom Tools > File Processing

6.1 Custom Tools, File Processing, Import InventorThis 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.

Page 28: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

6-2 Custom Tools > File Processing

Page 29: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

7. Custom Tools >GeometryProcessing

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

7.1 Break Curves at MiddleThis FEMAP API .bas script breaks curves at the midpoint of selected curve(s).

7.2 Create Points At NodesThis FEMAP API .bas script create a point at every selected node.

Page 30: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

7-2 Custom Tools > GeometryProcessing

7.3 Extrude Multiple SurfacesThis 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 SurfacesThis 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.

Page 31: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Free Edges of Sheets to Groups 7-3

7.5 Free Edges of Sheets to GroupsThis 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 DeleteThis 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 CurveThis 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 SliceSolidsUpdateLayersAndGroupsThis 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 CsysThis 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.

Page 32: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 33: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

8. Custom Tools > Grouping

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

8.1 Element Group ExpandThis 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 FileThis 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).

Page 34: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

8-2 Custom Tools > Grouping

8.3 Generate groups with solid namesThis FEMAP API .bas script generates a group for every solid in the active FEMAP model file including its related entities.

8.4 Geometry Group ExpandThis 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 SurfaceThis FEMAP API .bas script adds any surface to the active group associated to a selected element.

8.6 Group From Displayed GroupsThis FEMAP API .bas script creates combines displayed groups into a new group.

8.7 Group Matching ThicknessThis 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 SurfaceThis FEMAP API .bas script creates a new group containing nodes on a selected surface.

8.9 GroupRigidIndependentNodesThis 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 GroupSurfacesWithSelectedRadiusThis FEMAP API .bas script creates a group of cylindrical surfaces with a user-specified radius.

8.11 Property to LayersThis 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.12 Removed Solids From Group Based On IDThis 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.13 Renumber Groups AlphabeticallyThis FEMAP API .bas script renumbers groups beginning with ID = 90,000,000 by their title.

Page 35: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.

Page 36: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

9-2 Custom Tools > HoneyComb PSHELL > HoneyComb PShell Property

9.1 HoneyComb PShell PropertyThis 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)

Page 37: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

HoneyComb PShell Property 9-3

The resulting PSHELL property results as follows given the data entries in the snapshot of the dialog box:

Page 38: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

9-4 Custom Tools > HoneyComb PSHELL > HoneyComb PShell Property

Page 39: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

10. Custom Tools >Import then Connect Startup

10.1 Import ConnectThis 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.

Page 40: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

10-2 Custom Tools > Import then Connect Startup

Page 41: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

11. Custom Tools > Load Processing

These Custom Tools API scripts provide tools to automate FEMAP load creation.

Page 42: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

11-2 Custom Tools > Load Processing

11.1 Bearing load in active load setThis 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.2 Bearing load in new load setThis 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.3 Solid Face Loading with EquationThis 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.4 Load Processing, Temp Grad in XThis 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.5 Load Processing, Temp Grad in yThis 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 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.6 Temp Grad in ZThis 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.

Page 43: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

12. Custom Tools > Meshing

These Custom Tools API scripts provide tools to automate FEMAP 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.

Page 44: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

12-2 Custom Tools > Meshing

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 CurveThis 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.

12.4 Combine and Mesh SurfacesThis 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 GapsThis 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 ElementsThis 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.

Page 45: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Copy Nodes with Increment 12-3

12.7 Copy Nodes with IncrementThis 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 ElementsThis 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 FastenerThis 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.10 Merge All NodesThis FEMAP API .bas scripts merges all coincident nodes in the model with a tolerance of .001.

Page 46: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

12-4 Custom Tools > Meshing

12.11 Move Merge NodesThis 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 SpringThis 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.

12.13 Multi Mass ElementsThis FEMAP API .bas script creates a MASS element at every user-selected node using a user-selected MASS property.

Page 47: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

ShowBadTetras 12-5

12.14 ShowBadTetrasThis 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.15 Show Worst ElementThis 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.16 Spider CurvesThis 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.17 Spider NodesThis 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.18 Spider SurfacesThis 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.19 SpiderThis FEMAP API .bas script operates identically to the API script, Spider Nodes.

Page 48: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

12-6 Custom Tools > Meshing

Page 49: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.1 CBUSH Csys Display ResetThis FEMAP API .bas script deletes all GFXArrows used to display CBUSH coordinate systems generated by the API script, CBUSH Csys Display.

Page 50: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

13-2 Custom Tools > Model Query

13.2 CBUSH Csys Display Reset with Message BoxThis 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 DisplayThis 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 10This 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 VectorThis 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 GroupThis 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 TypeThis 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 DefinedThis 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 DefinedThis 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.

Page 51: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

GroupShowAllConnectedElements 13-3

13.10 GroupShowAllConnectedElementsThis 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 Tria3sThis FEMAP API .bas script highlights all 3-node triangular elements in the active model.

13.12 LSDyna_Time_Step_CalculatorThis FEMAP API .bas script calculates the minimum time step required for a LS Dyna analysis.

Page 52: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

13-4 Custom Tools > Model Query

13.13 Model ContentsThis 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 CheckThis FEMAP API .bas script checks for redundant dependencies on RBE2 and RBE3 elements and lists any redun-dancies in the Messages pane.

13.15 ShowConnectedElemsThis 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.

Page 53: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

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.BASThis API .BAS script copies user-selected nodes and projects the copied nodes onto a selected curve.

14.2 Move Nodes Normal To CurveThis 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.

Page 54: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

14-2 Custom Tools > Node Update

Page 55: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

15. Custom Tools > PostProcessing

These API scripts automate post-processing operations.

15.1 ASME Stress Intensity CalculatorThis 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.

Page 56: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

15-2 Custom Tools > PostProcessing

15.2 Bar Get Output DataThis 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 ShearThis 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 ElementsThis API .BAS script calculates the factor of safety for solid elements for a selected Output Set.

15.5 Calculate Mid Plate StressesThis API .BAS script calculates mid-plane plate stresses and creates Output Vectors for mid-plane stresses in the element X and Y directions.

15.6 GROUP_POST_FNOThis 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.7 Laminate Envelope Failure IndicesThis 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.

15.8 Laminate Max Fiber StrainThis 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.9 Laminate Next PlyThis 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.10 Laminate Prev PlyThis 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.

Page 57: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

Line Element Elongation From Displacements 15-3

15.11 Line Element Elongation From DisplacementsThis 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.12 List Output to ExcelThis API .BAS scripts populates a new Excel spreadsheet with results for selected elements for the selected Output Vectors and Output Sets.

15.13 Nodes Move By Deform with OptionsThis API .bas script moves nodes by scaling X, Y and/or Z deformation values of the active Output Set.

15.14 Nodes Move By DeformThis API .BAS script moves nodes by the value of the X, Y, and Z deformation values of the active Output Set.

15.15 RealVonMises_All Output SetsThis 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.16 RealVonMises_Select SetsThis 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.17 Strain Energy ParticipationThis 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.18 Sum Contact Grid Point Forces, Sum AdvNonlin Contact ForceThis API .bas script list the sum of contact forces on selected surfaces for the active Advanced Nonlinear Output Set.

15.19 Sum Contact Grid Point Forces, Sum AdvNonlin Contact GPF

Page 58: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

15-4 Custom Tools > PostProcessing

On ConnectorThis API .bas script lists the sum of contact force on selected connectors for the active Advanced Nonlinear Output Set.

15.20 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.21 Sum Contact Grid Point Forces, Sum Contact GPFThis 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.22 Tetra Adaptive Mesh and RerunThis 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.

15.23 Word Report GeneratorThis 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.

Page 59: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

16. Custom Tools >Solid Connection Tools

These API scripts automate the setting of surface on solids transparency and colors.

Page 60: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

16-2 Custom Tools > Solid Connection Tools

16.1 Isolate SolidThis 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 TransparentThis API .BAS script sets the value of transparency of the surface on a selected solid to 70 percent (70%).

16.3 Mesh SolidThis 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 SurfacesThis 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 FixupThis API .BAS script sets all surface colors to the color of the solid they are attached to.

Page 61: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

17. Custom Tools >Standard Analysis

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

Page 62: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

17-2 Custom Tools > Standard Analysis

17.1 modal analysisThis 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 analysisThis 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.

Page 63: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

18. Custom Tools > Views

These API scripts automate...

18.1 Snap to Closest Orthogonal ViewThis API .BAS script sets the active Femap view to the orthogonal view closest to the active views current orienta-tion.

Page 64: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

18-2 Custom Tools > Views

18.2 Switch Background For PrintingThis 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 SwapThis 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 FlipThis API .BAS script toggles the active View between Free Edge and Hidden Line modes.

Page 65: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

19. Custom Tools > Visualization

These API scripts automate the generation and contour plotting of model load and element thicknesses.

Page 66: Femap Custom Tools -  · PDF file12.15 Show Worst Element ... 13.2 CBUSH Csys Display Reset with Message Box ... 15.18 Sum Contact Grid Point Forces, Sum AdvNonlin

19-2 Custom Tools > Visualization

19.1 Plot Nodal TempThis 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.2 Thickness To OutputThis 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.3 Total Laminate Thickness To OutputThis 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.