Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Editor++ Code Templates ====== Code Templates are pre-built code snippets that can be inserted into an active record within the Editor++. This Help topic discusses the creation and use of Code Templates. Included in OpenInsight are sample Code Templates. [[#Inserting_Code_Templates|Inserting Code Templates]] [[#Creating_Code_Templates|Creating Code Templates]] [[#Sample_Code_Templates|Sample Code Templates]] ===== Inserting Code Templates ===== Place the cursor in a new or opened Stored Procedure. Select Code Templates from the Utilities menu. {{se_code_template_menu.jpg?715x630}} A popup of available code snippets will be displayed. Select the Code Template or Templates you would like to insert into the Stored Procedure. {{se_code_template_popup.jpg?432x178}} Click OK. If a Template has a place holder for user inputted data, fill in the data as necessary. {{se_code_template_replace.jpg?521x490}} Data was entered in the Value column of the edittable. The parameter within the code snippet will be replaced with the corresponding value. {{se_code_Template_Example.jpg?530x275}} ===== Creating Code Templates ===== Code Templates are stored in the SYSCODETEMPLATES table. To create a Code Template, open a new record within the System Editor++. Enter a code snippet and then save the record in the SYSCODETEMPLATES table. ==== Notes ==== * When creating a Code Template, you may enter replaceable strings within the template. Replaceable strings must start and end with the percent (%) character, i.e. %FILENAME%. * The following replaceable strings are constant : %USERNAME% and %DATE%. %USERNAME% will be replaced with the current username and %DATE% will be replaced with the current date. ===== Sample Code Templates ===== === V119 Sample === {{se_rti_v119.jpg?475x290}} === Btree.Extract Sample === {{se_rti_btree_extract.jpg?606x365}} === Loop...Readnext Sample === {{se_rti_loop_readnext.jpg?467x359}} === Open File Sample === {{se_rti_open_file.jpg?374x152}} === Program Header Sample === {{se_rti_program_header.jpg?496x310}} guides/programming/programming_in_openinsight/se_code_templates.txt Last modified: 2024/06/19 20:20by 127.0.0.1