Giter Club home page Giter Club logo

Comments (3)

DaveFace avatar DaveFace commented on August 20, 2024

Hi @Franklin-A - Ruby scripts within the UI can't work with Control data, this script would only be possible using WS Pro Exchange. The reason is that the WSApplication.current_network method only returns the active 'Geometry' network and not the 'Control' network. Therefore the same limitation applies to the run_SQL method.

If you don't need this to be dynamic you could use SQL to set some user text fields to reflect the object's control settings, which you would be able to access via Ruby UI.

from open-source-support.

Franklin-A avatar Franklin-A commented on August 20, 2024

Thanks for the reply @DaveFace. This was bugging me for a good while - and your answer is exactly why I couldn't find any examples or documentation on the matter.
However, I did eventually manage to find a solution - the run_SQL method does actually work on the network's open 'control' table and therefore enables the selection of links & nodes based on control field criteria. I'm not sure if it'll work on all control fields and blobs (I've yet to experiment) but it's worked seamlessly on simple fields such as valve mode, valve opening, pipe closed, etc.
In addition, I think it will work on writing to control fields - but only if the object has data in the control table already. If not, then it would be necessary to 'add control' to the object first.

from open-source-support.

DaveFace avatar DaveFace commented on August 20, 2024

I've just tested and that's correct for both read + write, good find! I'm not sure that is officially documented so (as you expect) it may not behave with all fields/blobs.

from open-source-support.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.