Cancel
Showing results for 
Search instead for 
Did you mean: 

Using FEMAP constants in Visual Basic

Valued Contributor
Valued Contributor

Hello, everybody!

 

 

I'm compiling some of my FEMAP APIs using the Visual Basic. I realized that the FEMAP constants in Visual Basic can't be inserted alone; It's necessary to insert before them the constant's type. For instance, in the command feAppMessage, instead of using simply FCM_NORMAL to indicate the font's color, you must insert zMessageColor.FCM_NORMAL.

In the most constants, a suggestion box brings the constant'S type, but I can't find out what I must use with global constants, like FE_OK, FE_ERROR, FE_CANCEL, and so on. Could anybody help me with this issue?

 

 

Note: I read in FEMAP API  Documentation that a file, named api.bas located in FEMAP installation directory should be inserted into the code for making the FEMAP constants available in Visual Basic. I searched for, but can't find this file. If somebody has this file it would helpful attach it here.

 

 

Best regards,

 

 

Fabiano.

3 REPLIES

Re: Using FEMAP constants in Visual Basic

Legend
Legend

Hello Fabiano,

 

see my attached small macro (it delete curves with associated points), I use constants like FCM_COMMANDFCM_NORMALFT_CURVE, FT_POINT, FE_OK without problem.

 

When I want to write this macro in Visual Basic, I can add the following lines to the beginning of code, and I can use for example the constant name FE_OK instead of femap.zReturnCode.FE_OK:

 

Imports femap.zDataType
Imports femap.zReturnCode
Imports femap.zMessageColor
Imports femap.zGroupDefinitionType

 

When you use other constants too, you can find its member with Object Browser in Visual Basic.

 

Best regards

 

Peter Kaderasz 

Re: Using FEMAP constants in Visual Basic

Valued Contributor
Valued Contributor

Peter,

 

Your answer was exactly what I needed. Thank you!

 

Fabiano.

Re: Using FEMAP constants in Visual Basic

Experimenter
Experimenter

Hi,

 

I've the same issue as Fabiano, a missing API.bas file. Names of constants are listed in the manual, but not the values. I'm programming in Excel VBA, utilizing the suggested Imports does not seem to work. I'd be most appreciative is someone would post the API.bas file.

 

Thanks,

 

Paul