Server functionality
The server provides a number of functions that you can use to start a calculation module, read or set values, and perform a calculation.
- starts a calculation module from the module descriptor (e.g. Z012 or W010). "interactive" defines whether the calculation module is to be generated with a graphical user interface.
- performs the main calculation for the active module.
- runs the main calculation for the active module, and returns a value to tell you whether the calculation is OK.
- is a function with which you can set variables to a required value. This data is transferred as text. You will find the variable names in the report templates, but there is no guarantee that all these variables will remain the same in the future.
- returns a variable from KISSsoft as text.
- displays the graphical user interface. Use the "wait" parameter to specify whether the function is to wait until the dialog is closed.
- shows whether a KISSsoft dialog is active.
- shows whether a module has been loaded.
- releases the loaded module again. You must always release a module again, to reduce the load on the server.
- loads the specified file.
- saves the calculation in the specified file.
- shows whether the license is valid.
- supplies the name of the loaded INI file.
- supplies the version number of the KISSsoft module in the calculation file (e.g. 2.6). (The version number depends on which module is being used)
- supplies the KISSsoft module name in the calculation file (e.g. M040).
- supplies the KISSsoft version number (e.g. 03-2011), given in the calculation file.
- supplies the KISSsoft version (e.g. 03-2011), that is registered and was started via the COM interface.
- Use the "flag" parameter to specify whether the ID (flag = 0) or the result (flag = 1) is to be used as the input. The output is then either the order and the name of the entry or the ID (in material database BEZ_DIN). If there is an error, no message is displayed. A "False" is returned for the function.
- supplies the value present in this database field. If there is an error, no message is displayed. A "False" is returned for the function.
- supplies the KISSsoft version of the temporary settings folder in which the personal settings are stored (e.g. 03-2014).
- defines whether messages are to be hidden or not, so that calculations can be performed without you having to confirm system prompts.
- writes the report. You can specify whether or not this report is to be displayed. The report is created in the Temp directory in the "KISS_?" subfolder.
- creates the report using the specified report template (infile) in the predefined place with the predefined name (outfile) and supplies the file type. You can enter file names either with or without the path. When you enter the report template ("infile") you should also input the file extension (e.g."Z012ld0.rpt"). If you do not enter a path for this file the program will search the default directory (see also Reports) for the file. You must also enter the file extension for an output file. If you do not specify the path, the file is saved to the Temp directory with the name "KISS_?". The file extension should match the specified type. Use the "show" parameter to define whether the report is to be displayed (or not). Use the "art" (meaning "type") parameter to define the output format. (art=0 → rtf format with *1 ; art=1 → rtf format without *1; art=2 → html format with *1 ; art=10 → txt format without *1 ; art=20 → txt format in Unicode without *1)
- *1 = takes into account the data level
- Examples of possible combinations: With default report templates → RTF format: ReportWithParameters("C:\Program Files (x86)\KISSsoft 03-2014\rpt\Z070ld0.rpt","C:\Temp\Z070ld0.rtf" ,1,0), HTM format: Call ksoft.ReportWithParameters("Z070ld0.rpt", "C:\Temp\Z070ld0.htm", 1, 2) ; with drawing stamp report template → TXT format: ReportWithParameters("Z10GEAR1d.rpt","C:\Temp\Z010GEAR1d.txt" ,1,10)
- returns the messages from the last calculation in the first parameter, as an array containing strings. The second parameter contains the particular message type (error, warning, info). The number of existing messages is shown in numElem.
- Use these functions to run special calculations. A more detailed list of the available calculations is available on request.
- Use these functions to run special calculations. A more detailed list of the available calculations is available on request.