I urgently need to write one macro :
The macro should not let user save the model if anything is changed in it (except creating one type of object). This means : the user (e.g "BANKUSER") should create only one object (e.g. SymbolNumb=999999) on EPC model and mustn't change anything else (attributes of objects or model, delete objects, placement of occurences and etc.) If he changes other things the shouldn't be saved.
I am new to macros , can you help me with the task ?
Thanks.
Vladimir Bis on
Hi Misha,
for example - I disable model attributes.
So, create macro with event "Model attribute is to be changed by modeling (vetoable)". Use this code:
var m = Context.getSelectedModels(); if (Context.getLoginInfo(m[0]).getUserName() == "BANKUSER"){ Context.setProperty("event.veto", "1") }Open model attributes and try to change any - are disabled. So try other events, but in event name must be "(vetoable)".