Jump to content

trevorgooch

Member
  • Posts

    41
  • Joined

  • Last visited

Reputation

19 Good

1 Follower

Personal Information

  • Occupation
    Gaffer / Technical Director / Problem Solver
  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I really appreciate the “like a view perspective”. It helps it make sense. I don’t think it’s worth the effort to me this month to dig deeper- it’s most important to be nimble. Thanks, Josh!
  2. Hello, my very clever friends! TLDR: Is there a way for the clip cube to inform the result of the criteria "is visible"? I have specifically tested it in the context of a worksheet database criteria, though not yet in a script. Backstory: I have a worksheet that is populated by the criteria "is visible" to give me a quick report of the current on screen elements in table form. (I have a script to recalculate active worksheet that's triggered by my stream deck) I often click on a row and "select item" -> fit to obj -> select similar -> clip cube ->... ??? -> profit wildly -> recalculate active worksheet to see what's around the elements I'm investigating. Anyway - I *think* I'd like to be able to use the clip cube as part of a worksheet criteria. Have a great day.
  3. @michaelk "I have a bunch of old worksheets" Probably shortly after I found all of your posts about worksheets, and scripts to improve formatting, I started adding three columns in almost every worksheet: Symbol/type, layer, and class. Always in a kinda grey as a house keeping note. "=FIRSTNONEMPTY(SYMBOLNAME, OBJECTTYPENAME)" for the symbol list - all in a way to reveal where we went wrong! Thanks for the script! This will save some time for sure!
  4. @michaelk- I will never stop loving posts about these scripts- and sharing this gospel far and wide. This and fast flats. And cabby. And…. Thanks for your contributions!
  5. This was a helpful demo to get my head around data linking in data tags. Best of luck!
  6. One thing that may help is to attach a record to the data tag, and use a link field. Essentially, you can shuttle data from the source object into a record associated with a data tag. This allows for all sorts of interesting opportunities, like applying a data visualization to a data tag!
  7. So, after talking to @Mark Aceto about this, my alternative solution is to move the calculation to the data manager (populating a field in an added record). Then the data tag can associate with the new data record. It’s a work around, but I was able to use “=IFS()” with multiple logical tests and returns.
  8. So, I've taken this a little farther: collecting the channels of lighting devices that share a dimmer (useful for labeling breakouts or breakers). The script looks for the match field and field to concat and return. Lots of options here - and no criteria. This does seem friendlier.
  9. @Pat Stanford Thank you for the advice, that is surely born out of experience. I've been considering the best way to address it, looking forward. I suspect simply not posting the scripts directly is the most prudent move. One of the big picture challenges I'm looking at currently, is how to make the drawings and solutions as resilient as possible. The opposite of "fragile" or easily broken. 😉. I will be on the look out for more danger zones!
  10. Fun stuff! You can simply paste the criteria into a parameter, and add an additional single quote to get around sting literal issues. Working this way, leaves me with a flexible method for commands that I wish were criteria aware, but are not! Here's a quick example: PROCEDURE WSSum; { This is a group effort, born out of Michael Klaers education draft! mucked around with by Trevor Gooch.} VAR s : DYNARRAY[] of CHAR; RecName : string; FieldName : string; Criteria : string; r,r1 : REAL; PROCEDURE SumReals(h1:HANDLE); BEGIN s := GetRField(h1,RecName,FieldName); r := Str2Num(s); r1 := r1 + r; END; { This now takes three parameters: the record name, the field name, and the critera. To get around single quotes in the parameter string, simply use two consequetive single quotes.} BEGIN RecName:=WSScript_GetPrmStr(0); FieldName:=WSScript_GetPrmStr(1); Criteria:=WSScript_GetPrmStr(2); ForEachObject(SumReals,Criteria); WSScript_SetResInt(r1); END; RUN(WSSum); Definitely solved my problem! Thanks! Counting Stanchions.vwx
  11. @Pat Stanford - you're speaking my language! It seems that parameters are zero indexed. Round one - working on a script to sum field values based on a criteria, where the records and fields and criteria are passed. Sort of a generic "sum field values by criteria" Also, I had no idea that we can pass a string as a criteria. This is very cool. Off to the races! Thanks, Pat!
  12. @Pat Stanford Is there a way to apply a critera to SUM in a worksheet cell, and specify the data field? I keep thinking I've missed something obvious! Thanks!
  13. @michaelk/ @Pat Stanford / @Fuge Thanks for the help! I didn't think of a worksheet cell script! It would be great to have criteria aware math functions or versions of functions - for example, Area and Count can be used in a cell as '=Area(**Critera**)'. or '=Count(**Critera**)'. A bit like sumifs or lookup in excel. I was sure that I had missed something obvious - but maybe what I had actually missed was another opportunity to home-brew the solution I needed. Thanks for the assist!
  14. Thanks, @Pat Stanford- it’s been an interesting exercise mashing up database criteria and database header functions into a single cell. It would SEEM that this is also pretty relevant to data manager expert mappings, and really leveraging data tags. I have success with “count” and objects. What I’d like to do is get a total of all the ‘Rope and Stanchion’.’TTLStanchions’ that meet a given criteria. Sort of a sum of field given a specific criteria.
  15. Hi, wizzards! ( @michaelk, @Sam Jones) I'm experimenting with single cell calculations in a worksheet, and getting tripped up. I would like to have a single cell count, say, the total amount of stanchions meeting a set criteria. I can get the total area of objects ie: =AREA(((C='Queue Lines-Reserved') & (LOC=A1))) In a database, I can get there with a database that looks like this: =DATABASE(INSYMBOL & (INVIEWPORT) & ((L<>'zzQUICK HIDE') & (LOC=A1) & (PON='Rope and Stanchion'))) and a column header like this: =VALUE('Rope and Stanchion'.'TTLStanchions') It seems like the function "objectdata" is part of the answer, but, I'm a little stuck. Any guidance would be super appreciated! -Trevor Gooch
×
×
  • Create New...