Reputation: 794
Do you know how to create an user defined macro in CnPack ?
The instructions shipped with it say it can be done but don't explain how. I tried to sign in the dedicated forum, twice, but it didn't work.
I searched for some tutorials online but didn't find anything either.
Upvotes: 1
Views: 473
Reputation: 125689
You simply define the new macro. Here's an example of doing so.
In the content area, put in the text you want to insert into your source. Let's try a third type of comment block with some silly information and a macro named MyMacro - note that I've surrounded it with %
characters:
(*
This is a nonsense comment by %MyMacro%
*)
Save the template, and then close the dialog.
Go into the IDE's Code Editor at the point you want to insert the template. Open the CnPack->Source Template menu, where you'll see your new TestTemplate at the bottom. Click it, and you'll see a dialog appear:
Fill in the Value (I'll use "Some Value") and click Ok. You should see this in the Code Editor:
(*
This is a nonsense comment by Some Value
*)
Upvotes: 2