Ignition Project Management, Time and Expense ERP.

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3482
    cajunconfiguratorcajunconfigurator
    Moderator
      Karma: 187
      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
      cajunconfiguratorcajunconfigurator
      Moderator
        Karma: 187
        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
        PLCGurutfgmedia_admin
        Keymaster

          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
          StixoffireStixoffire
          Participant
            Karma: 172
            Rank: Jedi

            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.