David nixon2 Posted August 29 Share Posted August 29 Hello Guys, Is there any way to create a scalar during an upload of Asset Tree. Looking at Tanks Levels and would like to Create PvHi and PvLo at the same time Level 6 Name Friendly Name Datasource Name ID Type A EXP.LI42CPW.P Process Variable Stored Signal Scalar here PVHIHI LiteralScalar B EXP.LI44SUMP.P Process Variable Stored Signal Scalar here PVHIHI LiteralScalar C DGP.LI30BNK1.P Process Variable Stored Signal Scalar here PVHIHI LiteralScalar Link to comment Share on other sites More sharing options...
Seeq Team Kin How Posted August 29 Seeq Team Share Posted August 29 Hi David, You can use the iterrows() function to loop over your DataFrame and add the scalars. Let's say I have a DataFrame with all PVHI and PVLO limits: I can apply iterrows() function to add these limits to my asset: for index, row in csv.iterrows(): #add Hi/HiHi Limits my_csv_tree.insert(name = row['Limits 1 Name'], formula = str(row['Limits 1']), parent = row['Level 3']) #add Lo/LoLo Limits my_csv_tree.insert(name = row['Limits 2 Name'], formula = str(row['Limits 2']), parent = row['Level 3']) my_csv_tree.visualize() The asset tree will look like this: My CSV Tree |-- Cooling Tower 1 | |-- Area A | | |-- PVHIHI | | |-- PVLO | | |-- Temperature | |-- Area B | |-- PVHIHI | |-- PVLO | |-- Temperature |-- Cooling Tower 2 |-- Area D | |-- PVHI | |-- PVLO | |-- Temperature |-- Area E |-- PVHI |-- PVLO |-- Temperature Link to comment Share on other sites More sharing options...
David nixon2 Posted August 29 Author Share Posted August 29 (edited) Works Great! Thanks so much!!! Edited August 29 by David nixon2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now