Class Module
99 Members
★ 1 Top 20
Units Class
Entisoft Tools 2.0 Object Library · Units · 41 Functions · 8 Properties · 49 Subroutines
Declarations
Declarations
Measurement conversion function library also available separately as part of Entisoft Units . Copyright 1998 Entisoft
Section
ConvertToBaseUnits
Convert To Base Units
True if the expressions resulting from mismatched conversions should be returned.
Property
HTMLTemplate
HTML Template
Get the current Entisoft Units CGI HTML Template.
Property
InitializeDone
Initialize Done
True if the automatic initialization of built-in unit, prefix, and text replacement definitions have been loaded.
Property
TypeBase
Type Base
Fundamental unit of measurement.
Property
TypeCategory
Type Category
Unit represents of category of physical measurements.
Property
TypeDerived
Type Derived
Derived unit based on other fundamental or derived units.
Property
TypeOther
Type Other
Other measurement unit or constant definition.
Property
TypeSynonym
Type Synonym
Synonym for a unit.
Property
AddPrefix
Add Prefix
"Add Prefix Definition" Add a prefix such as "kilo" into the units conversion program table, or replace an existing definition. Prefixes can be used to modify any of the known units within measurement expressions. Function returns an empty string upon success. Function returns the error message as a string when errors occur.
Function
AddReplacement
Add Replacement
"Add Replacement Definition" Add a global text replacement definition. Defines text which will be replaced by something else wherever it occurs within measurement expressions. Function returns an empty string upon success. Function returns the error message as a string when errors occur.
Function
AddUnit
Add Unit
"Add Unit Definition" Registers a new measurement definition. Add a unit such as "foot = 12 inch" into the units conversion program table, or replace an existing definition. Also used to add measurement categories and measurement synonyms. Function returns an empty string upon success. Function returns the error message as a string when errors occur.
Function
CGIToHTML
CGI To HTML
View VB6 signature, parameters, and usage notes.
Function
ConvertMeasure
Convert Measure
"Convert Measurement" Convert a measurement to some other type of measurement. For example, convert 1/5 ft/s (feet per second) to mph (miles per hour).
★ Top 20
Function
ConvertSimple
Convert Simple
"Simple Convert Measurement" Simple numeric conversion between certain important measurements. This function is mainly for people who want to use the ConvertSpecial high-level conversion function with a simple lower-level conversion function for support. As is, this function converts between inches, feet, and meters.
Function
ConvertSpecial
Convert Special
"Special Convert Measurement" Perform measurement conversions to and/or from combinations of major and minor units. Also supports the input and output of fractional numbers and the rounding of results.
Function
ConvertString
Convert String
"Convert Measurement String" Perform the measurement conversion described by the string argument. Parse a string like "5 ft to in" and pass it to the Convert function. Accepts strings of the form "5 ft to in", "ft^2 to in^2", "5 in", and "in", etc.
Function
ConvertTest
Convert Test
View VB6 signature, parameters, and usage notes.
Function
ConvertTextFilesTest
Convert Text Files Test
View VB6 signature, parameters, and usage notes.
Function
ConvertToExpr
Convert To Expr
View VB6 signature, parameters, and usage notes.
Function
DefaultHTMLTemplate
Default HTML Template
View VB6 signature, parameters, and usage notes.
Function
DescribeUnit
Describe Unit
Describe a unit definition in the form of an Ensligh sentence.
Function
Draw1String
Draw 1 String
Converts a string expression such as "45 m^2/kg*m*s^2" to something like:
Function
Draw2Strings
Draw 2 Strings
Take two measurement expressions like "ft/s" and ".3048 m/s" and return a string of the form:
Function
Draw3Strings
Draw 3 Strings
Take three measurement expressions like "ft/s", "in", and "12/second" and return a string of the form:
Function
DrawSimple
Draw Simple
Converts a string expression such as "45 m^2/kg*m*s^2" to something like "45 m^2 / kg m s^2"
Function
EnumerateUnits
Enumerate Units
"Enumerate Units " Enumerate the units and prefixes which are used within a measurement expression. For example, "ft*lb/s^2" would be translated to "foot*avoirdupois pound/second^2" Synonym-type units are replaced by their definitions, and unit codes are replaced by the name of the unit.
Function
FindBaseCategories
Find Base Categories
Convert a measurement expression into base units (meters, seconds, etc.) then replace those base units with the names of the fundamental physical measurements they represent (length, time, etc.).
Function
FindCategory
Find Category
Determines the primary physical measurement represented by an expression. Return the name of the most common physical measurement described by the measurement expression. For example, the expression "meters/seconds" (and any other expression which involves a combination of length over time) is most commonly used to represent measurements of velocity.
Function
FormatNumeric
Format Numeric
Format a numeric value so it looks good when displayed with a whole bunch of other numbers and words. Many numbers are not displayed using their full precision.
Function
GeneralTip
General Tip
Alternate between displaying tips from the tip list and displaying unit definitions in descriptive format.
Function
GetPrefix
Get Prefix
"Get Prefix Definition"
Function
GetPrefixCount
Get Prefix Count
Number of prefix definitions in the table.
Function
GetReplacement
Get Replacement
"Get Replacement Definition"
Function
GetReplacementCount
Get Replacement Count
"Get Replacement Count " Number of global text replacements in the table.
Function
GetUnit
Get Unit
"Get Unit Definition"
Function
GetUnitCount
Get Unit Count
Number of unit (measurement) definitions in the table.
Function
LoadFiles
Load Files
Load the unit, prefix, and/or global text replacement definitions from one or more files. File Names argument can accept wildcards and it can accept multiple file names separated by spaces. Returns an empty string in case of success. Returns the error message when errors occur. More specifically, errors are returned when they occur in non-interactive mode, or after they have occurred in interactive mode and the user has chosen to discontinue the process.
Function
LoadMultipleLines
Load Multiple Lines
Loads the unit definitions, prefix definitions, global text definitions, and data files specified by the argument.
Function
LoadOneFile
Load One File
Load the unit, prefix, and/or global text replacement definitions from an individual file. Returns an empty string in case of success. Returns the error message when errors occur.
Function
LoadOneLine
Load One Line
Interpret (parse and execute) a string as a command to load something like a data file or a unit definition. Commands can load the built-in definitions, multiple data files, unit definitions, prefix definitions, or text replacement definitions.
Function
NotFound
Not Found
Returns a string describing units which partially match or which sound like the argument. Usually called by functions which have looked for the definitions of units but failed to find one. By partially match, I mean that two or more of the characters at the beginning of the codes must be the same.
Function
PrefixTest
Prefix Test
View VB6 signature, parameters, and usage notes.
Function
PrepHTMLTemplate
Prep HTML Template
View VB6 signature, parameters, and usage notes.
Function
RelatedUnits
Related Units
Display measurements related to the current Calculator From Measurement expression in the Tip box.
Function
SampleConversions
Sample Conversions
Perform sample conversions to other units which are related to the expression in the Calculator's From Measurement box. Conversion calculations are performed in the background so that the CPU is not blocked and the user can continue to use the program.
Function
UnitCategoryTest
Unit Category Test
View VB6 signature, parameters, and usage notes.
Function
UnitCategoryUnknownTest
Unit Category Unknown Test
View VB6 signature, parameters, and usage notes.
Function
UnitDuplicateTest
Unit Duplicate Test
View VB6 signature, parameters, and usage notes.
Function
UnitTest
Unit Test
View VB6 signature, parameters, and usage notes.
Function
AddPrefixSub
Add Prefix Sub
"Add Prefix Definition Subroutine" Add a prefix definition, displaying any error messages in the debug window. Used to avoid having to handle return values while installing the built-in prefix definitions.
Sub
AddReplacementSub
Add Replacement Sub
"Add Replacement Definition Subroutine" Add a global text replacement definition, displaying any error messages in the debug window. Used to avoid having to handle return values while installing the built-in text replacements.
Sub
AddUnitSub
Add Unit Sub
"Add Unit Definition Subroutine" Add a unit/measurement definition, displaying any error messages in the debug window. Used to avoid having to handle return values while installing the built-in unit definitions.
Sub
CalculatorWindowHelp
Calculator Window Help
When checked, all user input and calculated results are shown with the physical measurements that they represent. For example, any measurements of the form "length per time" (e.g. "miles per hour") are described as "speed". When checked, the units mentioned in all input and result expressions are enumerated. For example, the program will tell you that "kg*m^2" was interpreted as "kilogram meter^2" When unchecked, any remaining units are returned in the standard SI units for the physical measurement. For example, measurements of energy such as "kilowatt hours" are displayed in joules (the SI unit of energy). When checked, results are displayed in terms of the fundamental base units (kilograms, meters, seconds, amperes, etc.) The result window changes colors to indicate when units are matched or mismatched or when there is an error. The results are formatted as appropriate to show as much information as possible within the current size of result window. Results are calculated and displayed as soon as there is a pause in your typing--no need to press {Enter} to perform the calculation.
Sub
ClearAll
Clear All
"Clear All Definition" Initialize or reset the program by clearing the definitions within the conversion-related tables. This clears the unit, prefix, and text replacement definitions.
Sub
ClearPrefixes
Clear Prefixes
"Clear Prefix Definition" Clear out the conversion prefix related tables.
Sub
ClearReplacements
Clear Replacements
"Clear Replacement Definition" Clear out the global replacements.
Sub
ClearUnits
Clear Units
"Clear Unit Definition" Clear out the conversion unit related tables.
Sub
ConvertSpecialSample
Convert Special Sample
View VB6 signature, parameters, and usage notes.
Sub
CurrencyConversionsHelp
Currency Conversions Help
View VB6 signature, parameters, and usage notes.
Sub
DefinitionsWindowHelp
Definitions Window Help
Double-click an entry in the list or press Enter with it highlighted to have that unit or prefix added to the most-recently-active box in the Calculator Window.
Sub
DistributionFilesHelp
Distribution Files Help
View VB6 signature, parameters, and usage notes.
Sub
EntisoftUnitsOrderFormSample
Entisoft Units Order Form Sample
View VB6 signature, parameters, and usage notes.
Sub
FunctionCallInterfaceHelp
Function Call Interface Help
performs measurement conversions given a numeric measurement, the units of that measurement, and the desired units for the result. For example, estConvert(5, "feet", "meters") converts 5 feet into meters, returning 1.524. performs measurement conversions to and/or from multiple related units, as well as supporting fractional numbers and the rounding of results. For example, estConvertSpecial("5' 11 13/16""", "m", "", 1000, False) converts 5 feet 11 13/16 inches into meters, returning 1.824. performs similar conversions given a string describing the conversion to be performed. For example, estConvertString("5 feet to meters") performs the same conversion as in the above example. enumerates the units represented by an expression. For example, estConvertEnumerate("KW*hr") returns "kilowatt*hour". determines the physical measurement represented by an expression. For example, estConvertFindCategory("KW*hr") returns "energy". performs several consistency checks of the currently-defined measurements and prefixes. loads the unit definitions, prefix definitions, global text definitions, and data files specified by the argument. registers a new conversion factor which Entisoft Units can use within conversion calculations. For example, estConvertAddUnit("in", "inches", 1/12, "foot", "length") defines a unit of length named "inches" with identifier "in" as 1/12 of a foot. registers a new prefix which Entisoft Units can use within conversion calculations. For example, estConvertAddPrefix("m", "mega", 1000000) adds the prefix "mega" identified by "m" as 1,000,000 (10^6). registers a new text string replacement which Entisoft Units will attempt to apply during each conversion calculation. For example, estConvertAddReplacement("inch", "in", 0) adds the synonym "inch" which is replaced everywhere that it occurs within expressions by "in".
Sub
HTMLUnitsList
HTML Units List
Go through the currently-defined units, prefixes, and global text replacements generating an index which will be displayed to the user in a list box. This function stores the data in a different list box depending upon whether or not Visual Basic is to sort the entries.
Sub
InitializeMandatory
Initialize Mandatory
Guaranteed install or update of the built-in unit, prefix, and global text replacement definitions.
Sub
InitializeMaybe
Initialize Maybe
Install the built-in unit, prefix, and global text replacement definitions if it has not already been done.
Sub
InstallationInstructionsHelp
Installation Instructions Help
View VB6 signature, parameters, and usage notes.
Sub
OrderingInformationHelp
Ordering Information Help
View VB6 signature, parameters, and usage notes.
Sub
ParseExpression
Parse Expression
Separate the numeric and symbolic parts of a measurement expression. "12 m/s" would be separated into 12 & "m/s". "foot per minute" would be separated into 1 & "foot per second".
Sub
ProgramOverviewHelp
Program Overview Help
View VB6 signature, parameters, and usage notes.
Sub
ProgramWindowHelp
Program Window Help
See the estConvertLoadMultipleLines function for details on the available commands. See also the estConvertAddUnit, estConvertAddPrefix, and estConvertAddReplacement functions which are the primary functions called by most programs. Each command is written in the form of a call to one of the Visual Basic functions responsible for the corresponding operation. In this way, definitions can be copied from the supplemental data file into Program window and work unchanged. Each command should appear on a separate line. Lines which do not begin with the names of one of the recognized commands are silently ignored. When the Program is blank, Entisoft Units will load the built-in unit, prefix, and global text replacement definitions. When the Program is non-blank, Entisoft Units will only load its built-in definitions if it encounters the estConvertAddBuiltIn command within the program.
Sub
RecallWindowHelp
Recall Window Help
View VB6 signature, parameters, and usage notes.
Sub
ResistorColorCodesHelp
Resistor Color Codes Help
View VB6 signature, parameters, and usage notes.
Sub
SearchDetailsHelp
Search Details Help
View VB6 signature, parameters, and usage notes.
Sub
SetupA
Setup A
"Setup 'A' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "A"
Sub
SetupC
Setup C
"Setup 'C' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "C"
Sub
SetupD
Setup D
"Setup 'D' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "D"
Sub
SetupE
Setup E
"Setup 'E' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "E"
Sub
SetupF
Setup F
"Setup 'F' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "F"
Sub
SetupH
Setup H
"Setup 'H' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "H"
Sub
SetupI
Setup I
"Setup 'I' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "I"
Sub
SetupK
Setup K
"Setup 'K' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "K"
Sub
SetupL
Setup L
"Setup 'L' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "L"
Sub
SetupM
Setup M
"Setup 'M' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "M"
Sub
SetupN
Setup N
"Setup 'N' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "N"
Sub
SetupP
Setup P
"Setup 'P' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "P"
Sub
SetupR
Setup R
"Setup 'R' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "R"
Sub
SetupS
Setup S
"Setup 'S' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "S"
Sub
SetupT
Setup T
"Setup 'T' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "T"
Sub
SetupU
Setup U
"Setup 'U' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "U"
Sub
SetupUnits
Setup Units
"Setup Measurement Definitions" Load the built-in definitions for the important measurements and constants. These measurements are loaded automatically when the first measurement-related function is called.
Sub
SetupV
Setup V
"Setup 'V' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "V"
Sub
SetupW
Setup W
"Setup 'W' Measurement Definitions" Load the built-in definitions for measurements whose physical description begins with the letter "W"
Sub
SISystemBaseUnitsHelp
SI System Base Units Help
View VB6 signature, parameters, and usage notes.
Sub
SupplementalDataFileHelp
Supplemental Data File Help
View VB6 signature, parameters, and usage notes.
Sub
SystemRequirementsHelp
System Requirements Help
View VB6 signature, parameters, and usage notes.
Sub
TemperatureConversionsHelp
Temperature Conversions Help
Entisoft Units supports temperature conversions. For example, converting "74 dF" (degrees Fahrenheit) to "dC" (degrees Celsius) returns 23.33. When converting from temperatures of zero degrees, remember to enter "0" followed by the temperature measurement--the absence of a number is interpreted as "1".
Sub
TipsWindowHelp
Tips Window Help
View VB6 signature, parameters, and usage notes.
Sub