Hello,
I'm adding a text into the model via a script and an additional requirement here is I dont to want the "Last Change" and "Last User" system attributes of the model to be changed.
To achieve this below are the steps used in the script :
1)calling setAutoTouch(false)
2)adding the text(via logic) into the model
3)saving the model via ArisData.Save(Constants.SAVE_IMMEDIATELY)
4)calling setAutoTouch(true).
Please note : setAutoTouch(false) - disable system attributes updates and setAutoTouch(true) - enables system attributes updates.
However after executing the script we're experiencing wierd behaviour where we need to specifically go to each model to save the changes(which means the models are written but are not yet commit via script).
Can someone pls guide is anything is missing here ?
Hi,
I have the same problem. I want to update an attribute but do not want the last change date and last user to be updated automatically. The touch function seems to be deprecated, but now we end up with a lot of system users as last user due to this automatic update. I created a report, which updates an attribute in an assigned model, via APG with 'arisservice' user and is now automatically the last user.
Please help :-)
Regards,
Theo Padding
Hello Krishna,
as much as I can see ArisData.getActiveDatabase().setAutoTouch() is still not explained in Aris 10.0.17.3 Script Help. Somewhere on the road they changed the default DB Save mode to SAVE_AUTO (cf. Report class ArisData - Method Save), so I guess you will need to combine both:
//all subsequent modifications to database objects are only performed in memory.
ArisData.Save(Constants.SAVE_ONDEMAND);
ArisData.getActiveDatabase().setAutoTouch(false); // No touch
....
ArisData.Save(Constants.SAVE_IMMEDIATELY); // revert save mode
ArisData.getActiveDatabase().setAutoTouch(true);
As an example look up how SAG used it in the standard report "Import translated attributes".
I am not sure if Save(Constants.SAVE_IMMEDIATELY)
really does save contents or only changes the Save Mode for subsequent changes. Script Help authors often use preposterous semantics:
SAVE_IMMEDIATELY: All changes will be stored immediately into the database
It's a promise for the future, not present tense. So you might need to change s.th. afterwards.
Regards, Martin
Hello Martin,
Thanks for your swift response.
We're able to edit the model without updating the system attributes.
We've another few issues(mentioned below) with respect to text that we're inserting into the model.
1) line breaks - We're unable to break the text line and entire text is coming in one single line even after using "\n".
2)Font Format for text- Unable to change the font format. We had a look in ARIS Help but couldn't find any functions for making text "Bold" and change the "Font Size".
Can you pls help with these issues ?
Regards,
Krishna Boddu
Hello Krishna,
I can only guess what you mean by "adding a text into the model", so this post might be a solution. It covers the save mode topic as well.
It would be easier to get a response if you presented extracts from your code here to describe the problem.
Regards, Martin