地理信息系统开发工具gisdk使用手册英文版第三部分creatinggisdkmacros内容摘要:

ious types of errors, including errors in syntax, invalid statements, and mismatched doend statements. If errors are detected, the resource piler creates an error file listing each error and the line number at which it was detected. The error file has the same name as the resource file and an extension of .ERR, and is always placed in the same folder as the resource file itself. 5 GISDK includes several versions of the resource piler. You can choose to pile resource files using:  The buttons in the GISDK toolbox  The program from DOS or Windows  LoadResourceFile() from within your own GISDK application For more information, see... Compiling and Testing with the GISDK Toolbox Compiling with the StandAlone Resource Compiler Compiling with LoadResourceFile() UserDefined Compilation Flags Compiling and Testing with the GISDK Toolbox The GISDK toolbox is an addin that contains tools you use to pile and test GISDK applications: Tool Function Compile resource file(s) to the default UI Database Test a macro or dialog box Compile resource file(s) to a standalone UI Database Start the GISDK Debugger Execute one or more Caliper Script statements immediately When you installed TransCAD, the GISDK Toolbox addin was added to the file, just like any other addin. The button in the GISDK Toolbox piles resources into a UI Database named TEST_UI. When you pile a resource file (or several resource files in a list file) using the button, first the TEST_UI database is cleared, and then the piled resources are added to that database. The button in the GISDK Toolbox tests a resource that you piled into the TEST_UI database. You specify the name of the resource to run, and whether it is a macro or a dialog box. The button in the GISDK Toolbox lets you choose the UI Database in which to store the piled resources. The database you choose is cleared, and then the piled resources are added to the database. The button in the GISDK Toolbox starts the GISDK Debugger, which helps you find and fix runtime problems in GISDK macros. You can set breakpoints in resource files, see the call stack, see the values of variables, and set up a watch list. The GISDK Debugger runs along side TransCAD, in a separate window. 6 The button in the GISDK Toolbox lets you type Caliper Script mands into a dialog box and have them executed immediately. This is often helpful when you are testing or debugging your GISDK programs. There are many cases where immediate execution of a statement is helpful. For example: Statement When to use it ShowMessage() To display debugging information (., ShowMessage(GetLayer()) to display the name of the current layer。 or ShowMessage() to see the name of the State your GISDK macro loop is working on) SetLayer() To set the current layer before testing an addin DestroyProgressBar() If your GISDK macro accidentally leaves a progress bar on the screen, this statement will get rid of it SetScale() To change the map scale to an appropriate value RunMacro() To run a GISDK macro you use for testing or debugging purposes Immediate execution can be used to import files, perform selection, read and update data values, and more. However, certain mands may not have the desired effect. Here are a few examples:  The Exit() statement will terminate TransCAD and return you immediately to Windows  Assignment statements will have no effect, unless the variable you are assigning to is a global variable  The Return() statement will have no visible effect, because it simply returns from the immediate execution GISDK macro.  To Compile a Resource File into the Default UI Database 1. Click in the GISDK toolbox to display the Compile dialog box. 2. Choose the file to pile and click OK. GISDK piles the resource file into the TEST_UI database. If any errors are encountered, the piler creates an error file and displays a message.  To Compile a List of Resource Files into the Default UI Database 1. Click in the GISDK toolbox to display the Compile dialog box. 2. Choose the file containing a list of resource file names to pile and click OK. GISDK piles the resource files into the TEST_UI database. If any errors are encountered, the piler creates error files and displays a message.  To Test a Resource in the Default UI Database 1. Click in the GISDK toolbox to display the Test an AddIn dialog box. 2. Choose the type of addin that you are testing from the Type of AddIn radio buttons, Macro 7 or Dialog Box. 3. Type the name of the resource you want to test, and click OK. GISDK tests the resource you chose. If you want to test a resource where there is interaction with a map or other window, such as clicking to select a map feature, you will need to pile the resource file into a custom UI Database, install it as an addin, and run it from the AddIns dialog box.  To Compile a Resource File into a Custom UI Database 1. Click in the GISDK toolbox to display the Compile dialog box. 2. Choose the file to pile and click OK. GISDK displays the Save As dialog box. 3. Type the name of the UI Database you want to create, and click OK. GISDK piles the resource file into the UI Database that you chose. If any errors are encountered, the piler creates error files and displays a message.  To Compile a List of Resource Files into a Custom UI Database 1. Click in the GISDK toolbox to display the Compile dialog box. 2. Choose the file containing a list of resource file names to pile and click OK. GISDK displays the Save As dialog box. 3. Type the name of the UI Database you want to create, and click OK. GISDK piles the resource files into the UI Database that you chose. If any errors are encountered, the piler creates error fi。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。