Hi,
Thank you for your question. The event "EndADLImport" has only a Boolean output-parameter "successful". To solve your issue you would need the combination of the following three event listeners:
- CreateModel
During the import of models ADOxx handles the import of each model as creating a new one. In this event we collect the modelids of the imported/created models. Here we have to distinguish if the modelids really created or imported. Therefore we define a global Boolean variable (See example below bCollectModelIDs). - StartADLImport
We set here the Boolean value to “true”. So we can start to collect the ids. - EndADLImport
If the import ends we set again the Boolean value to “false” and end the collection.
The implementation for the approach above is as follows:
#Define a global Boolean variable bCollectModelIDs if the app is initialized1ON_EVENT "AppInitialized" {
2SETG bCollectModelIDs:0
3}
#In the event CreateModel we differ the two cases of the Boolean variable bCollectModelIDs (The value is set in the EndADLImport and StartADLImport events)1ON_EVENT "CreateModel" {
2SETG nModelId: (modelid)
3 #Collect the Ids of the models which are imported
4 IF (bCollectModelIDs) {
5 SETG lImportedModelIDs: (tokunion(lImportedModelIDs, STR nModelId))
6 }
7}
#Set the Boolean variable bCollectModelIDs to “True” (-> Start collecting ids in the CreateModel event).
1ON_EVENT "StartADLImport" {
2SETG lImportedModelIDs:""
3SETG bCollectModelIDs:1
4}
#Display the collected Modelids and stop collecting by setting bCollectModelIDs to “false”.1ON_EVENT "EndADLImport" {
2CC "AdoScript" INFOBOX ("The following modelids have been imported: " + lImportedModelIDs)
3SETG bCollectModelIDs:0
4SETG lImportedModelIDs:"" # not needed since reset when you start a new ADL import.
5}