This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, I have been tweeking the designer templates to better suit our work. My question is this: Is there a way to pass an argument to the template script? For example I would like to change the behavior when a certain flag is set. This flag would be per project or better yet per model. I've been keying off of the $Context.namespace variable but that won't work for me anymore. Thanks -Bert |
|
|
That's not currently possible I'm afraid, but we could certainly add it for you. Another possibility is to use our per-project template support. If in Solution Explorer you select a project containing a .lsmodel file then you should see a Custom Template File entry in the Properties window. The advantages of this are that you can put your templates in source control so that other developers get them automatically when they update their copies of the project, and you don't need to worry about reinstalling LightSpeed overwriting your custom templates. (Obviously the downside is that in your scenario you would end up with multiple copies of the templates with very minor variations, but you could probably work around this by having a core template file and having each per-project template just set up some flags and then #parse in that core file.) If that doesn't suit you then let us know and we'll look at adding a "custom code generation data" property to the model. |
|
|
Thanks. I'll try the Custom Template File first and let you know how it works out. |
|
|
The Custom Template File solution will work for us. Thank you for the quick reply.
-bert |
|
|
Well i ran into a problem. The tool doesn't seem to accept a reletive path for the Custom template file parameter. Relative to the project file I'm keeping my customized scripts at ..\LightSpeed\Designer_Scripts\*.vm Any advice? |
|
|
It looks like we're resolving relative paths relative to the current directory (which I believe will be the Visual Studio EXE directory) rather than the project directory. I'll get that fixed for you. |
|
|
Thanks |
|
|
The relative paths issue is now fixed in current nightly builds (19 Mar 2009 and above). Please let us know if you run into any problems! |
|
|
Great! As soon as I can get back to it I will give it a try. -Bert |
|
|
Ivan, It works great. How long before this fix would be in the Standard Edition? We have a license for Standard. I can use the express for a while longer, but I will need more entities pretty soon. Thanks for the very fast fix. -Bert |
|
|
Nightly builds are available for all editions -- Express, Standard, Professional and Enterprise. Fixes and enhancements go into all editions at the same time. So when you buy Standard, just download the Standard nightly from the store instead of (or as well as) the RTM version. |
|