Ignition Project Management, Time and Expense ERP.

Home PLCGurus.NET Live & Interactive Forum PLC Questions and Answers General Automation Questions Ignition Project Management, Time and Expense ERP.

https://www.linkev.com/?a_fid=ics-eng

This topic contains 3 replies, has 3 voices, and was last updated by Ken S Ken S 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3482
    Cajun Configurator
    Sean Terrell
    Moderator
    • Topics: 6
    • Replies: 29
    • Total Posts: 35
    Karma: 184
    Rank: Jedi

    Any here have any experience using Ignition to build an “off label” application with Ignition?

    I am struggling with some Jython functions and custom property calls to create JOIN statements

    Also looking for guidance to dynamically resize windows.

     

    -Scooter

    #3481
    Cajun Configurator
    Sean Terrell
    Moderator
    • Topics: 6
    • Replies: 29
    • Total Posts: 35
    Karma: 184
    Rank: Jedi

    Any here have any experience using Ignition to build an “off label” application with Ignition?

    I am struggling with some Jython functions and custom property calls to create JOIN statements

    Also looking for guidance to dynamically resize windows.

     

    -Scooter

    #3488
    Fred Graham
    Fred Graham
    Keymaster
    • Topics: 13
    • Replies: 158
    • Total Posts: 171

    Hey Sean,

    For some reason this thread appeared twice in the forum list. What I’ve done is merged the two into a single thread so the replies coming in (hopefully there are some for you) will appear chronologically here.

    -Fred

    #3824
    Ken S
    Ken S
    Participant
    • Topics: 3
    • Replies: 14
    • Total Posts: 17
    Karma: 35
    Rank: Padawan

    Python is a standard coding language much like Java – so your Join statements regarding SQL would be easily found online for Python. However – you can achieve this in different ways – you can utilize a SQL script or stored procedure to do your Query against the Server – depending on what backend DB engine you are using.. SQL server or MySQL or whatever.

    Create your query as a string – you can use MS SQL Management Studio or MySQL Workbench to design your query with the proper Joins and test that against your Database.
    After performing those tests to make sure you have the correct data. Create your Query in python as a String and feed it to the Python SQL driver.

    import sqlite3 as lite //(if using SQL LiteDB)
    con =lite .connect ( “C:\temp\my.db” ) // Your database connection string here it uses SQLLite DB
    cur =con . cursor () // this cursor contains the result set when executed
    query = “Query You created and tested” // such as Select * from table1 InnerJoin blah on Blah.Id = Foo.Id
    cur . execute ( query )

    You need to get access to your window object to dynamically resize it, and then after setting size refresh/update the window to redraw itself.. If that is what you desire – with the window open, if not you will need to pass the size arguments to the window when you open the window.`

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login Register