Demonstrates the use of multiple API files in Femap
Actions can be created in the Femap API Programming window including:
This Code Module example will demonstrate the use of relative file locations.
For this example, assume the following arbitrary file structure
[C:\Temp\Code_Module_Example]
driver.BAS
[SUBFOLDER_EXAMPLE]
print_function.BAS
The contents of driver.BAS:
'#Uses "SUBFOLDER_EXAMPLE\print_function.BAS"
Sub Main
Dim App As femap.model
Set App = feFemap()
local_print("demonstration_string")
End Sub
The contents of print_function.BAS
Public Module MYPRINT
Public Function local_print(str As String)
Dim App As femap.model
Set App = feFemap()
App.feAppMessage(FCM_WARNING, str)
End Function
End Module
In the Femap API window, select the Open button and navigate to the location of driver.BAS and select it. In the Femap API window, select the Play button. In the Messages window, "demonstration" will be printed in blue.