Jump to content

patjdixon

Super Seeqer
  • Posts

    94
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by patjdixon

  1. I figured it out! Set all-properties to True. Lab_Pred_DF = spy.search({ 'Name': 'Lab_*_PRED', 'Scoped To':scopedtoid }, all_properties=True) Lab_Pred_DF
  2. I am trying to access the 'Formula Parameters' on specific signals that I created. I notice that if I do a spy.search to return the signals I created, when I try to show 'Formula Parameters' they are not there: However, if I do a spy.search on a worksheet, I can access the 'Formula Parameters': Notice I am access the same signal ID in both cases. Is there some way to do spy.search on specific signals and have that search return the 'Formula Parameters'?
  3. I had an archived asset tree 'PM_SIM_AssetTree' with items in it that were not archived. This was because of a prior error on my part. To fix it, I used an API call to delete it. Afterwards, the script runs each time and overwrites the existing tree
  4. I do have archived items. What do I do to fix this? Do I use remove()?
  5. What I am trying to do is create a DataLab script that will create an asset tree regardless of whether it is a new tree or an existing tree in the workbook. Ideally I would just like to overwrite whatever tree is already there so that every time I run the script I end up with the same asset tree. The problem I have is that apparently every time spy.assets.Tree is used, it tries to create a new tree. This contradicts the SPy documentation for Asset Trees 1 - Introduction, which says: "Say you have an existing asset tree in Seeq, perhaps from an external datasource like OSIsoft PI AF, and you wish to clean up the tree or add calculations to it for further analysis. You can define a tree in SPy using this existing tree as a starting point by referring to it by name in the spy.assets.Tree input." If I try to create a reference to my existing tree PM_SIM_AssetTree using PM_SIM_AssetTree = spy.assets.Tree('PM_SIM_AssetTree', workbook=scopedtoid), I get an error saying that there is an invalid item. The path suggests that it is trying to insert a new tree instead of creating a reference to the existing tree: It doesn't matter whether I use workbook=scopedtoid or workbook=workbook_name, I get the same result. I know that the scopeid reference to my workbook is correct. What is required to do either of these? - detect the existence of a tree and remove it so that I can create the new one - create the tree everytime with overwrite if it already exists
  6. You cannot use spy.search result in the move function
  7. It did not fix it. The "insert" and "push" copy the signals, do not move the signal. The results is a copy of the signal without the formulas. I do not want to lose the formulas. Therefore, this did not work. What I need is a way to move the signals to the designated asset tree folder and preserve all configuration
  8. I fixed it by searching for all the items that had been in the folder, then did "insert" and "push" in DataLab. It is fixed.
  9. Looks like all signals/items that were in the folder can be searched by name and show they are not archived, but they do not show up anywhere in the asset tree.
  10. The folder has quite a few formula signals that I need to recover. By deleting the folder, I lost access to those items
  11. I accidentally deleted the wrong folder in my asset tree. I used the SEEQ REST API for Folders using Delete /folders/{folderid}. Since it is archived, I assume there is a way to restore. How would I restore the folder?
  12. Never mind, I needed to specify the time zone timeSince(days('US/Central'), 1min)
  13. I have timeSince(days(), 1min), but I notice instead of starting each day at 12:00 AM it is starting at 7:00 PM. What do I need to do to fix midnight as the start of each day?
  14. Now I see! I was assuming maxValue($SearchArea) was hard coding the search. Your explanation makes sense: maxValue is returning a search result, but then $signal.within($ValidData) is only passing the capsules in the condition to it. Therefore, as long as $SearchArea fully includes the capsules in $ValidData it will work. I just need to hard code dates well before and well after any capsules I would use. Thanks!
  15. There seems to be a misunderstanding. I do not want to find the max for a moving window. I want to find the max for "Data valid". I want to specify the condition for "Data valid" and find the max for capsules with that condition. In my case I have only 1 capsule for this condition. Whatever that max value is, I want the signal to apply for all time, like a constant. We have accomplished creating the signal for all time, but the capsule("2020-01-01T00:00:00Z","2022-07-28T00:00:00Z") uses a fixed time period instead of the "Data valid" condition. If there is a way to use "Data valid" instead of hard coded times, I will have what I want.
  16. Shamus, that is fantastic, we are really close! The missing piece is the capsule. I do not want to hard code the dates in. I would like to use all capsules in the "Data valid" condition. In my case there is only one capsule for "Data valid", but regardless I would like that condition to determine when to obtain the max or min. Is there a way to do that?
  17. Thank you Joe, that gets me partway there. That creates a constant for the duration of the condition. What I need is the max or min during the condition becoming a signal for a constant signal for all times
  18. I am trying to create a signal that is the maximum or minimum of a signal. If I use agggregate, I get a single value in time, not a signal that applies to all time periods: What I want is the equivalent of what you get with a constant, but instead of a hard coded value I want the max or min of a signal. As you see below, the constant signal is for all time periods I thought toScalars might help, but it doesn't work: Any ideas?
×
×
  • Create New...