HyperWorks Desktop

*RegisterExternalDLLFunction()

Registers a MATLAB function in a library compiled with MATLAB Compiler version 4 or later.

*RegisterExternalDLLFunction()

Registers a MATLAB function in a library compiled with MATLAB Compiler version 4 or later.

Previous topic Next topic No expanding text in this topic  

*RegisterExternalDLLFunction()

Registers a MATLAB function in a library compiled with MATLAB Compiler version 4 or later.

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Syntax

*RegisterExternalDLLFunction("Function Name", "Third party DLL name", "Path to the compiled math function", "Number of Arguments", "Number of Outputs")

Arguments

Name

Description

 

"Function Name"

The display name of the function within the HyperWorks application.  The name cannot contain spaces

 

"Third party DLL name"

The name of the third party DLL.

 

"Path to the compiled math function"

The full path and filename of the compiled library.  Usually a .dll file on Windows PC and a .so file on LINUX and UNIX.

 

"Number of Outputs"

The number of outputs returned from the math function.  Usually "1".

Example

*RegisterExternalDLLFunction("TwoOutput","TwoTTT.dll","C:/ExtDLL/MatlabFn.exe",1,2)

*RegisterExternalDLLFunction("Myinterp","hgmatlab.dll","C:/ExtDLL/MatlabFn.exe",3,1)

Application

MotionView, HyperView, HyperGraph and HyperGraph 3D.

Context

*BeginDefaults()

Comments

Compile m-functions with MATLAB Compiler version 4 and later.  Among the files generated, two files are used: the .dll, or .so, file and the .ctf file.  The .ctf file needs to be in the same directory as the .dll file.

Multiple functions are supported in the same DLL.

Functions sharing a name with an existing HyperGraph math function are overwritten by the HyperGraph math function.

See also

 

*RegisterExternalFunction()

List of Preference Statements

Compiling MATLABFn