We have multiple projects and I’d like to use the same code (that i’m writing) for each project. In this code, ideally, it would write the Project Title to the database, along with some other data. How can I access that Project Title via the aimms code?
Hi Rob!
I played a bit with this and found a solution, by using the observation that the name of the project is always reflected in the first node in the model explorer (“Main <projectName>”). This seems to be treated as a model Section and for that reason it is the first element in the predefined set AllSections. To get to the actual model name, a simple substring operation is needed to cut off the “Main_” part in front of it:
ModelName := FormatString("%e", First(AllSections));
DialogMessage(
SubString(ModelName, 6, StringLength(ModelName))
);
(where ModelName is a string parameter in your model).
Hope this helps,
Mischa
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.