Results 1 to 9 of 9

Thread: Getting at a parameter (Area Type)

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

    Not allowed! Not allowed!

    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
    Click image for larger version. 

Name:	Exterior Area.png 
Views:	23 
Size:	13.8 KB 
ID:	36596



    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?
    Click image for larger version. 

Name:	Capture.PNG 
Views:	32 
Size:	156.8 KB 
ID:	36597
    Click image for larger version. 

Name:	Captures.PNG 
Views:	20 
Size:	13.5 KB 
ID:	36598
    Last edited by snowyweston; May 14th, 2019 at 04:15 PM.

  2. #2
    Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    72
    Current Local Time
    01:13 AM

    Not allowed! Not allowed!
    What do you get if you use an Elements.Parameters node after your AllElementsOfCategory node? Screenshot or it didn't happen.

  3. #3
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,442
    Current Local Time
    07:13 AM

    Not allowed! Not allowed!
    Quote Originally Posted by kraftwerk View Post
    Screenshot or it didn't happen.
    I get the elements*:
    Click image for larger version. 

Name:	results.PNG 
Views:	24 
Size:	118.1 KB 
ID:	36599

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

    Click image for larger version. 

Name:	property.PNG 
Views:	11 
Size:	6.3 KB 
ID:	36600


    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
    Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    72
    Current Local Time
    01:13 AM

    Not allowed! Not allowed!
    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.

    Click image for larger version. 

Name:	dynamoWeston2.PNG 
Views:	34 
Size:	175.1 KB 
ID:	36602
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	dynamoWeston.PNG 
Views:	17 
Size:	139.1 KB 
ID:	36601  
    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,442
    Current Local Time
    07:13 AM

    Not allowed! Not allowed!
    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)

    Click image for larger version. 

Name:	cast.png 
Views:	14 
Size:	167.1 KB 
ID:	36603

    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
    Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    72
    Current Local Time
    01:13 AM

    Not allowed! Not allowed!
    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,442
    Current Local Time
    07:13 AM

    Not allowed! Not allowed!
    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
    Member kraftwerk's Avatar
    Join Date
    November 1, 2012
    Location
    St. Louis, MO
    Posts
    72
    Current Local Time
    01:13 AM

    Not allowed! Not allowed!
    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.

    Click image for larger version. 

Name:	dynamoWeston3.PNG 
Views:	24 
Size:	165.5 KB 
ID:	36610

    Edit #1:

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

  9. #9
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,442
    Current Local Time
    07:13 AM

    Not allowed! Not allowed!
    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)

    Click image for larger version. 

Name:	romeo.PNG 
Views:	38 
Size:	71.3 KB 
ID:	36611
    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
  •