Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

add comment block at start of procedure

Wondering how to :
1.) make the creation of a new procedure automatically open with a standard comment block at the
beginning.
2.) Add this capability to everyone in the programmers group SRP Editor

Comments

  • You could try using the auto text option in SRP Editor Options.

  • edited May 2023
    I believe there are two ways that you could do this:

    1) Setup your comment block in a new record, then go to File -> Save As Template, and give it whatever name you'd like. Then, once you click on the "New Item" button in the editor, you can use the "Custom Template" option (bottom right), and choose the template you just created. Since these are stored in SYSENV, other users should be able to see and load these custom templates.

    2) In the editor, go to Tools -> Options and the Auto Text tab (see Barry's screenshot above). Here you can define up to 10 different blocks of text to a Ctrl+# number combination. You could put your comment block into one of those numbered sections and call it up at will. However, if I'm not mistaken, the editor options are stored in Window's registry and may only be available to the user who created the auto text option. Each user would have to make their own, which could potentially be different between each user.
  • >>..File -> Save As Template,....you can use the "Custom Template" option (bottom right)

    Wow, that is cool, never noticed that one.
  • Me neither!

    I do recall stumbing accross the SRP_HTTP_FRAMEWORK_TEMPLATE_API_BODY and SRP_HTTP_FRAMEWORK_TEMPLATE_API_COMMENT_BLOCK SYSENV records a long time ago and thought they were for this purpose but I didn't know how to initiate them, nor do I recall asking at the time. Forgotten all about that...until now.

    Good tip Frank!
    Needless to say I now have several Templates I can use regardless of how I access our Code Server....

Sign In or Register to comment.