Donate Now Goal amount for this year: 2500 USD, Received: 1627 USD (65%)

Results 1 to 9 of 9
Like Tree2Likes
  • 1 Post By kraftwerk
  • 1 Post By kraftwerk

Thread: Getting at a parameter (Area Type)

  1. #1
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,382
    Current Local Time
    07:48 PM

    Getting at a parameter (Area Type)

    I'm trying to get at my area's <Area Type> property (that lists using the Element.Parameters node) via
    Category=Areas > AllElementsOfCategory > Element.GetParameterValueByName
    Getting at a parameter (Area Type)-exterior-area.png



    just like this chap appears to have done:
    https://forum.dynamobim.com/t/how-to...area-type/6091

    So that I can filter sort them - and parse different ones to different processing functions - but my list (pre-filter) keeps coming up blank.

    Any ideas?

    EDIT
    Correction, I am skipping steps from that example, (believing the rest to be superfluous to my needs) - but still confused, as the parameter is sitting right there being read already?
    Getting at a parameter (Area Type)-capture.png
    Getting at a parameter (Area Type)-captures.png
    Last edited by snowyweston; May 14th, 2019 at 04:15 PM.

  2. #2
    Junior Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    42
    Current Local Time
    01:48 PM
    What do you get if you use an Elements.Parameters node after your AllElementsOfCategory node? Screenshot or it didn't happen.
    snowyweston likes this.

  3. #3
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,382
    Current Local Time
    07:48 PM
    Quote Originally Posted by kraftwerk View Post
    Screenshot or it didn't happen.
    I get the elements*:
    Getting at a parameter (Area Type)-results.png

    EDIT#1
    No I don't - I get the same number of returns (as I do elements) of IDs, if, when queried are:

    Getting at a parameter (Area Type)-property.png


    EDIT#2
    + shoving Element.Name into the output just returns blanks
    EDIT#3
    same for Clockwork's Element.Name+
    Last edited by snowyweston; May 14th, 2019 at 04:22 PM.

  4. #4
    Junior Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    42
    Current Local Time
    01:48 PM
    Running a similar path and checking if I can access the parameter type. Parameter Type is invalid. So, you couldn't call it with ParameterValueByName.

    Edit #1:
    New Image shows a way that you can filter out the Area Type name.

    Getting at a parameter (Area Type)-dynamoweston2.png
    Attached Thumbnails Attached Thumbnails Getting at a parameter (Area Type)-dynamoweston.png  
    Last edited by kraftwerk; May 14th, 2019 at 04:51 PM. Reason: New Information

  5. #5
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,382
    Current Local Time
    07:48 PM
    Thank you - that should help me get to where I want to be another way round.

    But after building what you have there - I'm getting a "Cast not valid" error (?)

    Could it be* a lacing issue? I have always have problems with them, and note yours are set to "Auto" (where mine are old school)

    Getting at a parameter (Area Type)-cast.png

    EDIT
    ..yes, probably is a lacing issue - I get rid of the cast error using "longest"... (the results of which don't look quite right) and jut melting my PC with the cross product test now...?!?



    NB
    Looks like it's back to the Primer again for me!
    Is it on kindle yet? The weather's picked up of late in London and I'm loathed to sit at home and do this when there are beer gardens with sun!


    EDIT#2
    Whoops, was feeding the filter with the elements list not the parameter.value output - not that makes the results any clearer.


    Enough for today I'd say.
    Last edited by snowyweston; May 14th, 2019 at 05:51 PM.

  6. #6
    Junior Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    42
    Current Local Time
    01:48 PM
    What are you passing in to your FilterByBoolMask node? I was thinking you wanted to filter based upon a specific string value, i.e. if an Area Type is 'Building Common' vs. 'Generic Area Plan', etc. So, I was passing in strings to compare against the string. Bear in mind I only had one item I was working through in the example. I do not know if there is a better way to get just the Area Type Parameter Name and compare the value from there.

    Can also look at the Parameter.StorageType node to filter out only strings before making some type of comparisons.

    Edit #1:
    Lacing should be set to Longest in the nodes of my example if running 1.3 or previous.
    Last edited by kraftwerk; May 14th, 2019 at 05:59 PM. Reason: Some Logic

  7. #7
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,382
    Current Local Time
    07:48 PM
    Couldn't resist checking in (note not at machine now)… questions, good, I shall attempt answers.

    At first I was was passing ALL elements of the (area) category into the filter node, then noted in your screenshot the connection was from parameter.value.


    I'm essentially trying to cleave my list of area into two lists, one that are "Building Common Area", the other "Exterior Area" - as assigned on an instance-by-instance basis.


    I'm happy to go after either one - so long as I can isolate them distinctly (their parameters are destined for different concatenations) - and, were this any other property, I'd be long-done by now using list-split, etc.

    I can see the "Area Type" nested within the lists output by your method - but I don't know what to do with all the sub-lists, scrub the values of parameters that ARE not "Area Type", and keep continuity with other actions happening elsewhere in the script (where divisions create unequal lists)

  8. #8
    Junior Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    42
    Current Local Time
    01:48 PM
    Alright. Here's what I got. We will take the parameters from the Area Element and Get the Area Type as String (which oddly enough gets split between the Area Type as an Element and then gets separated out into a String value right after it (haven't seen that in a lot of other elements in Revit (either Dynamo or c#))), then we are will see if anything matches the string of "Building Common Area", Get the First Index of the true value (if it is -1, then the value was not found, so it is not the type we want to match). Knowing this, if the value is greater than 0, then match that with a Greater Than node, Run Filter By Bool Mask and you will get a list separated by your original Area Type string value.

    Getting at a parameter (Area Type)-dynamoweston3.png

    Edit #1:

    In my circumstance, there was only one that had the Type - Building Common Area.
    snowyweston likes this.

  9. #9
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,382
    Current Local Time
    07:48 PM
    Thanks so much again


    I'm just returning to say I got there, in the end, albeit with a forced use of the (Clockwork's) Passthrough node as I was getting recursion (of a suffix) when double-tapping my SP.

    I'm definitely calling it quits now, but will take a look at yours to see if I can't refine mine (which I'm certain would horrify elegant coders)

    Getting at a parameter (Area Type)-romeo.png
    Last edited by snowyweston; May 14th, 2019 at 10:00 PM.

Similar Threads

  1. Area Schedule - change Area Type
    By anthonyB in forum Architecture and General Revit Questions
    Replies: 1
    Last Post: December 6th, 2017, 03:34 AM
  2. Replies: 0
    Last Post: March 11th, 2016, 12:15 AM
  3. Type's parameter cannot recursively point to the type itself?
    By jeeenyuss in forum Architecture - Family Creation
    Replies: 4
    Last Post: March 27th, 2015, 06:02 PM
  4. select by parameter? curtain wall panels' materials by parameter, by type or family?
    By oompa_l in forum Architecture and General Revit Questions
    Replies: 1
    Last Post: January 24th, 2013, 02:20 PM
  5. Area Type parameter
    By gaby424 in forum Architecture - Family Creation
    Replies: 2
    Last Post: May 8th, 2011, 12:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •