sign up  |  forgot password
Eğitim

Tutorials  >  NVX Plug-in Extensions


1

NVX technology allows you to write plug-ins for nvStructural by using C++ to extend its functionality.

2

Developers can implement a plug-in by using the nvStructural API. A dynamic-link library with nvx file extension is coded to implement nvStructural API. Plug-in can access the functionality of nvStructural application and can also listen to the events raised by the application.

3

You can download the nvStructural API from here. To see an example plug-in visit Downloads section.

4

Current version of the NVX can be used to develop plug-ins that modify the input files sent to OpenSees for analysis and also to modify the output files received back from OpenSees. OpenSees input files can be modified during when nvStructural is generating the file, and also right after the file generation is done and before it is sent to OpenSees for analysis. This functionality allows one to very easily add additional commands to the input file. Output files that are created by OpenSees can also be modified right before they are read by nvStructural. This allows one to modify the results shown by nvStructural or access other analysis results.

5

NVExtension* GetExtension(NVStructuralApp* pNVSApp) function is used to load the plug-in into nvStructural. pNVSApp is passed to plug-in so that it can access the functionality of nvStructural. GetExtension returns an implementation of NVExtension from plug-in. nvStructural accesses the plug-in functionality by making calls to this NVExtension instance. Currently plug-in does not need to implement any NVExtension functionality.

6

Plug-in subscribes itself to the OpenSees file interaction events if it wants to be notified when input file is generated and when output is ready. This is achieved by calling NVStructuralApp::SubscribeToOpenSeesInteraction function. An event listener that is implemented by the plug-in is passed into this function to be sent to nvStructural. nvStructural will make calls to this listener to notify on OpenSees interaction events.

7

NVOpenSeesInteractionListener is the class that needs to be implemented by the plug-in to listen to OpenSees interaction events. Functions of this class are called by nvStructural as needed.

8

OnOutputToOpenSeesFileStarted is called right after the OpenSees file generation is started.

9

OnOutputToOpenSeesFile is called at different stages of OpenSees file generation. location variable passed in tells the current stage. The list of locations can be seen in OPSFileLocation enumerator.

10

OnOutputToOpenSeesFileFinished is called right after OpenSees file generation is finished. At this point file path is handed to the plug-in. Plug-in can open the file and read or modify it.

11

OnOpenSeesAnalysisResultReady is called after OpenSees is done with analysis. A list of files is passed into the plug-in. File types can be: "Displacements", "EigenValues", "EigenVectors%d", "Reactions", "LineForces", "ShellForces", "ShellStresses", "Solid8NodeForces" or "Solid8NodeStresses". File path will contain the location of the file so that plug-in can open and process/modify these files.

12

An example use case can be: adding more recorder commands to get additional results by implementing OnOutputToOpenSeesFile or OnOutputToOpenSeesFileFinished. Then these results can be processed by implementing OnOpenSeesAnalysisResultReady.

13

OpenSees interaction listener will be notified everytime when creating input file for analysis and when exporting nvStructural model to OpenSees file from File -> Import/Export menu.

14

Plug-ins can be added to nvStructural by clicking the File -> Options menu and using Application Options dialog. Check Use Extension and select the extension you want to activate. Plug-ins can be used with Professional, Academic and Trial editions of nvStructural.

15

Please get the nvxExample from Downloads section to see a working example of NVX. Easiest way to learn NVX and to create your own plug-in will be by modifying the example. Example is created using Visual Studio 2008 and it works fine with many other versions of Visual Studio.

Ana SayfaHizmetlerÜrünlerGaleriEğitimFirmaİletişim

Privacy Policy • noveltech © 2016