› PLCGurus.NET Live & Interactive Forum › PLC Questions and Answers › General Automation Questions › Ignition Project Management, Time and Expense ERP.
- This topic has 3 replies, 3 voices, and was last updated 4 years, 8 months ago by
Stixoffire.
- AuthorPosts
- November 1, 2018 at 5:55 am #3482
cajunconfigurator
ModeratorKarma: 187Rank: JediAny 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
November 1, 2018 at 5:55 am #3481cajunconfigurator
ModeratorKarma: 187Rank: JediAny 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
November 1, 2018 at 9:19 am #3488tfgmedia_admin
KeymasterHey 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
March 22, 2019 at 3:48 am #3824Stixoffire
ParticipantKarma: 172Rank: JediPython 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.`
- AuthorPosts
- You must be logged in to reply to this topic.