System Function Information - v14


 

Information used by the program during modelling is available to application command files via the function sys in the let command.

 

The sys function has one parameter, an integer which defines the item of system information required.

 

There are three types of system information: numeric values, string values and 3-D point values. The one returned by the sys function is defined by the type of the receiving variable in the let command, i.e. numeric variable(s), string variable(s) or 3-D point(s).

System Numeric Information

sys(1)The current modelling pen number.

 

sys(2) The current modelling dash pattern number.

 

sys(3)The current modelling line thickness.

 

sys(4)The current font for new annotations.

 

sys(5)The current decimal significance factor (number of decimal places for numbered output).

 

sys(6)The current cursor style: 0 is the full crosshair, 1 is the little cross, 2 through 10 are user cursors.

 

sys(7)The current viewport as a factor of the total graphic area. Four values will be returned, all with a value between 0 and 1.

 

sys(8)The default grid intervals: Two values will be returned the x interval and the y interval.

 

sys(9)The current graphic tolerances: Three values will be returned, the tolerances on the x,y and z axes.

 

sys(10)The current tolerance used in interactive item selection.

 

sys(11)The current screensize parameter used for perspective drawing production.

 

sys(12)The current angle of visual panorama (lens angle) in degrees.

 

sys(13)The current plotting scale for plot file creation, e.g. a value 100 implies a scale of 1/100.

 

sys(14)The current curve approximation factor for arc and pipework display.

 

sys(15)The current default fragment number to be given to all newly modelled items.

 

sys(16)The current cameo size: two values will be returned, the x dimension and y dimension, both in pixels.

 

sys(17)The default annotation character height, a negative value implies an actual rather than scaleable value.

 

sys(18)The default annotation character aspect ratio, i.e. width/height.

 

sys(19)The default annotation angle in degrees.

 

sys(20)The annotation inter-line spacing as a factor of the annotation character height.

 

sys(21)The default dimension arrowhead type and size: two values will be returned, a negative arrowhead size implies an actual rather than a scaleable value.

 

sys(22)The dimension annotation offset, i.e. the distance of the annotation from the dimension line, as a factor of the annotation character height.

 

sys(23)The decimal significance for dimension lengths in dimension annotations, i.e. the number of decimal places.

 

sys(24)The dimension arrowhead chevron angle, in degrees.

 

sys(25)The current number of dialogue lines.

 

sys(26)The scales of drawing areas currently mounted on the digitiser. A returned value of 100 implies a scale of 1:100. Four values will be returned. Zero values imply that no corresponding drawing area is mounted, or that the value cannot be computed.

 

sys(27)The number of available graphic colours.

 

sys(28)The number of programmable function keys.

 

sys(29)General information about the workstation. Nine values are returned, each with a value 1 or 0, as follows:

1 Whether the workstation has graphics

2 Whether the workstation is split screen

3 Whether the alpha dialogue area is variable

4Whether tablet menu facilities exist

5 Whether erase features exist (rubout)

6 Whether the pull command is possible

7 Whether pop-up alpha menus are possible

8 Whether pop-up icon menus are possible

9 Whether fixed icon menus are possible.

 

sys(30)The maximum model size (in Kilobytes).

 

sys(31)The current block level

 

sys(32)The number of shared colours available. This also returns the information of the Colour Cube used by the Visualizer module. Colour Cube = int(sys(32)**(1/3))

 

sys(33)A value of 1 is returned when the stack is empty otherwise 0.

 

sys(34)The current number of nested command files. Useful to drive the exit command (i.e. "exit sys(34)").

 

sys(35)The display silhouettes flag. The value returned will be 0 (OFF) or 1 (ON).

 

sys(36)The display control polygons flag. The value returned will be 0 (OFF) or 1 (ON).

 

sys(37)The display control polyhedrons flag. The value returned will be 0 (OFF) or 1 (ON).

 

sys(38)The display lines of constant parameter flag. The value returned will be 0 (OFF) or 1 (ON).

Extended to handle Surface entities.

In such case fourteen values are returned:

1  = U Periodic (values: 0 or 1)

2  = V Periodic (values: 0 or 1)

3  = U Rational (values: 0 or 1)

4  = V Rational (values: 0 or 1)

5  = U Degree

6  = V Degree

7  = Number of control points in U

8  = Number of control points in V

9  = Number of Knots in U

10 = Number of Knots in V

11 = Start parameter in U

12 = End parameter in U

13 = Start parameter in V

14 = End parameter in V

 

sys(39)The number of lines of constant parameter to be displayed. Two values will be returned, and they are the number of lines in the U parameter range and in the V parameter range.

 

sys(40)The display curves according to a tolerance flag. The value returned will be 0 (OFF) or 1 (ON).

 

sys(41)The tolerance to be used in displaying curves.

 

sys(42)The tolerance to be used when faceting a body item.

 

sys(43) Return the currently active graphic window

 

sys(44) Return the position and size of the current active gwind (4 values).

 

sys(45) Returns the number of the active STACK.

 

sys(46) Returns the mode of windowing  operation display as 0, 1, 2  or 3 SDI, MDI, TDI or TDMI respectively

 

sys(47) Python is active.

 

sys(48) Ribbon is active.

 

sys(49) Size of the FULL desktop

 

sys(50) Position of Eagle Root with respect to top-left of desktop origin. Returns 0,0 if root window is maximized.

 

sys(51) Window is an OCX

 

sys(52) Winfont parameters: Size, Bold, Italic, and Underline.

 

System String Information

sys(1)The current version number of the program, e.g. 11.6.3

 

sys(2)The current user-id of the user. This will generally be linked to his or her "logon identification". The form of string may differ among machines of different manufacture.

 

sys(3)The current process-id of the session. This will be a unique string to differentiate this session from any other sessions of users currently using the system. Note this is only available where an actual process id is generated by the operating system, so, for example, on Windows 95 where there are no process ids there will be a spurious return on the information.

 

sys(4)The current working directory (library). This string is equivalent to the path ? command. The value may be changed by the path lib command.

 

sys(5)The home directory (library). This string gives the directory which was active at the beginning of the session. It is the directory to which you move by the path command without parameters.

 

sys(6)The full address of the std/ directory.

 

sys(7)The full address of the @ directory.

 

sys(8)Refers to the name of the sub-model currently being updated with the update command. A zero length string will be returned if not currently operating in update mode.

 

sys(9)The name of the default Design Data File, initiated by the data command. If no default file is active, a zero length string will be returned.

 

sys(10)The name of the currently active contour map file. This is defined via the map command. If no contour map file is active, a zero length string is returned.

 

sys(11)The current location code used during sub-model positioning. If location codes are not active, a zero length string will be returned. The current location code may be changed via the locate on command.

 

sys(12)The default justification parameter for annotations. At program startup, the value is M (middle justification). It may be redefined via the default j command.

 

sys(13)The default occurrence parameter for annotations and dimensions. A value of 0 implies "use the current view" and is the value at program startup. It may be redefined via the default occ command.

 

sys(14)The current units parameter, defined by the units command. At program startup the value is MM (for millimetres).

 

sys(15)The default units parameter, adopted after a reset command. At program startup, the value is MM. This may be redefined by the default u command.

 

sys(16)The full address of the lb1/ directory.

 

sys(17)The full address of the lb2/ directory.

 

sys(18)The full address of the lb3/ directory.

 

sys(19)The full address of the lb4/ directory.

 

sys(20)The name of the current auto-save file. This is defined via the save on command. It may be a user or system supplied name. If the autosave facility is not active, a zero length string is returned.

 

sys(21) -sys(30)The values of the default attribute codes. The codes will be returned irrespective of whether or not the automatic assignment of attributes is active.

 

sys(31)The name of the currently executing command file.

 

sys(32)The name of the reset command file.

 

sys(33)unused at present.

 

sys(34)The name of the port/line.

 

sys(35)Returns the current Eagle configuration file (including the full pathname).

 

sys(36)The name of the print device.

 

sys(37)The default protection attribute for new files, e.g. "O:RWE,G:R-E,W:R-E"

 

sys(38)The current latching criteria.

 

sys(39) Return the title of the current active gwind

 

SYS(40) Winfont parameter: name

 

System 3-D Point Information

sys(1)The current base point for graphic tolerance.

 

sys(2)The current local axes used during vector description. Three values are returned each being a set of 3 direction cosines.