Jump to content

Avoid graphical display upon GWC import


Recommended Posts

Posted
Dear all,

I'm struggling with an annyoing feature when I import a GWC from file to my turbine site. At the moment I do that as follows:


Call Workspace.ReEnableChangeRipples(True)
Set Member = TurbineSite.AsIHierarchyMember.Insertions.FromFile.ByClassID(ehmcWindAtlas).Execute(PartialGWCName,Nothing)
Call Workspace.DisableChangeRipples


When that code is executed, the imported GWC is automatically displayed in a new window in the right hand side of the main window. If you do repeated imports via script, the GUI will get cluttered soon, and closing these windows by hand is not what you really want when you are writing a script to automatize things...

Therefore my question: Is there a way to prevent that window from getting displayed after the import, or to close it automatically after is has been displayed?

Thanks for any suggestions!
Posted
Hi,

I appreciate that importing many new hierarchy members via scripting might clutter the GUI somewhat with all the windows opened, unfortunately however this behaviour cannot be controlled from a script. You will need to continue to manually close the windows, the fastest way is via the Window menu (Window -> Close All). I will add this to our suggested feature list for consideration.

Cheers,
Ray
  • 1 month later...
Posted
Hi Vob,

The code is trying to be smart. The hierarchy is only refreshed properly after the script has finished executing. Then, it looks to see how many new things have been inserted. If there are more than five, then no windows will be opened. Have you noticed that working?


Anyway, I've just added the feature you requested. A script can now call ReportingAssistant.DisableGuiWindowOpening. This will simply disable the opening of new windows from insertions for the script. It's reset automatically when the script has finished. The script can't turn it back on again, so you can't choose to have some windows displayed and some hidden within a single script operation.


This will be in the builds for WAsP 11.2. Hope that helps!

Best wishes,

Duncan.
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...