Is there any particular reason why you call the import from a batch? You also could do this directly in the IDE, I guess. For this you simply can create a user-defined menu option for the IDE that calls the component that does the import. For details see (e.g.):
I hope this helps.
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
Original Message:
Sent: 07-26-2022 05:52
From: Maxime CHAZALVIEL
Subject: Automatically refresh a component opened in the IDE after an $ude import
Indeed,
I call a .bat that points to the dev environment corresponding to my IDE to import and compile via $ude.
Is it not possible, if it is open, to get the instance of my IDE in order to use this API to do the refresh?
------------------------------
Maxime CHAZALVIEL
Rocket Forum Shared Account
Original Message:
Sent: 07-26-2022 05:37
From: Daniel Iseli
Subject: Automatically refresh a component opened in the IDE after an $ude import
This API will only work when called from the IDE. I guess you are trying to call this outside the IDE? Also, this API will only influence the editors that are open in the current IDE (where the API is called).
I hope this clarifies this matter.
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
Original Message:
Sent: 07-26-2022 04:31
From: Maxime CHAZALVIEL
Subject: Automatically refresh a component opened in the IDE after an $ude import
Thanks Daniel, I think this is really the thing for me!
However, I can't get it to work...
The script returns a $status = -1, but an error = 0.
Is there any special configuration to use this API?
------------------------------
Maxime CHAZALVIEL
Rocket Forum Shared Account
Original Message:
Sent: 07-25-2022 08:11
From: Daniel Iseli
Subject: Automatically refresh a component opened in the IDE after an $ude import
You can refresh a single or all open editors using the corresponding IDE API Operation refreshEditor or refreshAllEditors.
I hope this helps.
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
Original Message:
Sent: 07-25-2022 07:41
From: Maxime CHAZALVIEL
Subject: Automatically refresh a component opened in the IDE after an $ude import
Hello,
I would like to automate the import of xml from a project via a script.
For that I use a "$ude('import', ...)" and this import works well.
However, when a component is already open in the ide where I want to import it, the refresh is not done, so I have to click on the refresh button on the top left of the IDE.
I would like to be able to launch this refresh automatically.
Do you know what code is hidden behind this button?
Have a nice day,
Maxime
------------------------------
Maxime CHAZALVIEL
Rocket Forum Shared Account
------------------------------