Knowledgebase Home | Contact Knowledgebase Home| Contact
Search the Knowledgebase Browse by Category
Enumeration constants (srfGridFmtXYZ) are not working, how can I reference the Surfer type library?
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful
When the enumeration constants are not working or causing errors, it is usually because the Surfer type library is not referenced.

This reference is needed for a program to recognize the value of the enumeration constants (such as srfGridFmtXYZ) that Surfer uses to reference various settings.  You can reference the type library, or you can use the actual value of the constants in the commands instead of the enumeration constants (use 4 instead of srfGridFmtXYZ).

Referencing the Type Library

The Surfer Scripter program and the Microsoft VBA that comes with Word and Excel use the Edit | References menu command to add a reference to a program's type library


Add a reference to the Surfer type library with the Edit | References menu command in Surfer Scripter.

In addition, Scripter uses the #Reference command to reference the type library through the Surfer type library UUID (universally unique identifier).  The complete syntax for Surfer is as follows:

'#Reference {54C3F9A2-980B-1068-83F9-0000C02A351C}#1.0#0#C:\Program Files\Golden Software\Surfer8\surfer.exe#Surfer 8 Type Library

Place this command in the first line of the script.  Refer to the Scripter Help | Basis Language Help for complete information about this command.

Use Value Instead of Enumeration Constant

You can simply use a number value instead of the enumeration constant. This simply requires you to know the value of the constant. To display the value of an enumeration constant, type the constant name in the Scripter program that comes with Surfer, right-click on the name and choose the Quick Watch menu command.  The immediate window displays the value in the format:


This indicates that the value is 4 and the & indicates the variable type is a "long" or 32-bit integer value. 

You can also use the Debug | Browse menu command in Scripter to display the value and the related enumeration constants.


Display the value of an enumeration constant with the Debug | Browse menu command in Surfer Scripter.

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.
Post Comment for "Enumeration constants (srfGridFmtXYZ) are not working, how can I reference the Surfer type library?"
To post a comment for this question, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
Continue
Powered by ActiveKB Knowledgebase Software

Home * Products * Gallery * Support * About Us * Register * Order * Demos