Monday, 08 February 2021
  1 Replies
  871 Visits
0
Votes
Undo
Hello everyone,

I'm about to write a routine in VBA wich will change all prefered master according to an attribute entry.
The selection of the object in the opened edit dialog works well.But afterwards I want to copy the mastershapes from the template into my object. But there seems to be the issue if the editdialog is opened or not. In the EB-Explorer, without an open dialog, my code seems to work, but not when the edit dialog is open.
I think this might be the issue?!
so now to my question. Is there any possibility, to close an opened edit dialog? I gues for this, I can close the dialog, edit the prefered master and reopen it again.

I use this code:
Call oSelection.PreferredMasters.AddNew(oTemplate.PreferredMasters.Item(1))

I think the attribute "Material" will do the same, and there is a way to keep the edit dialog open?!

Thank you for any help.