Defining new items in the program menus. When the new command is added to the menu, it can also be added to main toolbar or to floating tool palettes.
Menu function can be created directly by utility list (line tools, model tools, additional functions, utilities) Menu-button.
Function name in menu and an unique id number. There are 35 commands (1700 - 1734), with a different button for each. The selected button image is displayed on the right.
Type of command. See below.
The actual command. See below.
Parameters of the command. See below.
Asks confirmation before executing function.
Displays comment as a message after executing function.
Executes external console program hidden.
Restores last used directory after executing function.
Description of function displayed on window bottom status line, when activating menu item.
The menu that will have the new command. New commands are shown last in the menu list.
1700 - 1714
1715 - 1734
1735 - 1760
1761 - 1769
Opens a file of a given type. Enter the format name as the Command, e.g. Dxf. You can also give file name as a parameter.
See also: Format converter.
Opens file from the directory given as parameter.
Save active file using given format. Enter the converter name as the Command, e.g. Dxf. As a parameter you can define path and name for the result file. If several comma separated converters are given, file is written using them all.
See also: Format converter.
To run an additional function or utility. Command is additional function module name (e.g. user.3dx or utility.3dx for utilities). Parameter is function id number.
To run an external program. Enter the programs full path as the Command, and any parameters needed by the function. If you enter a file extension as a parameter in the format %EXT, you will be asked which file you would like to use. E.g. having the command c:\Windows\notepad.exe and parameter %txt, you will then be asked to browse txt-file, which is then opened with Notepad.
Parameter can also be ATTR=name, where name is an attribute from the active point. If you use a bitmap name (attribute ATTACH =c:\data\picture.bmp), it can be shown in MsPaint.
Attribute or macro can also be part of the command or parameter. Attribute name is started normally with the character $ and macro name with the character #. Name ends automatically to any special character (e.g. c:\images\img_$T4.jpg) or it can be given within parenthesis (e.g. c:\images\img_$(T4).jpg). Name after backslash in file path must be given with two backslashes (e.g. c:\images\\$T4.jpg).
If the command is empty, the parameter file is opened with default application based on file extension. Both command and parameter can contain environment variables (e.g. %TEMP%), who will be expanded automatically.
If the parameter is URL web address, it is opened in the system default browser. If the address contains fields {x} and {y}, they are replaced by the active point coordinates. If there is no active point, screen center coordinates are used instead. If the address contains fields {lat} and {lon}, they are replaced by coordinate's latitude and longitude in decimal degrees. This works only with coordinate systems with known automatic conversion to geographical coordinates (KKJn, GKn, TMn).
Other coordinate systems can be handled with coordinate transformations. Used transformation name is given in {x} parameter separated by character @ (e.g. {x@GK27-TM35} or {x@Local-WGS84}). Zoom scale can be given with parameters {scale} or {level} depending on used service. Parameter {scale} is map scale value and parameter {level} is zoom level between 1 and 20.
Examples:
http://wikimapia.org/#lang=en&lat={lat}&lon={lon}&z={level}&m=w
http://kansalaisen.karttapaikka.fi/linkki?x={lat}&y={lon}&srs=EPSG:4258&scale={scale}&lang=fi&mode=rasta
https://tools.wmflabs.org/geohack//geohack.php?params=60.382504;25.987370_type:landmark_scale:{scale}
http://www.bing.com/maps/default.aspx?v=2&cp={lat}~{lon}&style=r&lvl={level}
https://maps.google.com/maps?ll={lat},{lon}&z={level}&spn=0.01,0.01&t=m
https://wego.here.com/?x=ep&map={lat},{lon},{level},normal
http://www.openstreetmap.org/?mlat={lat}&mlon={lon}&zoom={level}&layers=M
To perform a coordinate transformation for active file. Enter either the HEL- or AFF-file, or previously defined coordinate transformation name, as the command used for the transformation.
Browse button opens HEL- and AFF-files by default. With the Shift-key it can be used to select coordinate transformation from the list.
See also: Helmert transformation and Coordinate transformation.
Executes attribute conversion file for element list active vector file. Conversion file path is set as command. With the Shift-key executes conversion from right to left.
Changes program code file. Code file name is given as parameter.
To run an internal function. Enter the function number (e.g. 1311 point info) as the Command. Simplest way to give this number is just press appropriate tool buoon in the big palette.
You can define several commands on one line separated by a comma. If you add '*', at the end of the line, the function number is not shown and not acknowledgement is asked. In most cases the acknowledgement is necessary, because the function does not know when the previous function is finished and data ready for the next function.
See also: examples.
There are some special settings related to this function.
To replace UNC file path in menu item parameters. Input string to search and string to replace using equal sign. You may input several pairs separated by a semicolon.
E.g. \\server\share=s: converts path \\server\share\file.xyz to path s:\file.xyz.
See also: Using special settings