eclipse / eavp

Eclipse advanced visualization project
Eclipse Public License 1.0
9 stars 15 forks source link

VizServices and executing scripts #116

Closed amccaskey closed 5 years ago

amccaskey commented 8 years ago

I have a use case where I'd like to interact with the VisIt Viz Service by executing some custom VisIt python code. The IVizService currently doesn't have something like createPlot(String script), is this something that we should think about adding?

amccaskey commented 8 years ago

Discussed this with @jayjaybillings, it would be better to expose an executeScript method on the VizService interface.

amccaskey commented 8 years ago

Just to keep track, a VisItVizService.executeScript method could look like this:

public void executeScript(String script) {

    // Get the next available connection for the URI's host.
    Set<String> availableConnections = manager.getConnectionsForHost(host);
    String name = availableConnections.iterator().next();
    // ... check that we have a connection
    IVizConnection<T> connection = manager.getConnection(name);

    VisItSwtConnection widget = connection.getWidget();
    ViewerMethods methods = widget.getViewerMethods();

    for (String line : script.split(“\n”)) {
        methods.processCommands(line);
    }
}
SmithRWORNL commented 5 years ago

VisIt will no longer be supported in 0.3