Code Block and Element.GetParameterValueByName

hi i am wondering how to solve that:

cb

 

 

 

 

 

 

i extract wall parameters.

the element.getParameterByValue node’s result is the parmeter’s ID.

forwarded to a Code Block i will need the content of the parameter not the ID.

any solution???

tx peter

I don’t know if I follow you completely, but it’s possible to type a string value for the parameter value you want to access:

7

Is that what you expect? (If you want to use codeblock you can use this syntax: a.GetParameterValueByName(“Mark”);

the “a” can be replaced with whatever you want the input to be called.

Is the problem here that you need element that is represented by the Id and not the Id itself as a string?

If that’s the case, there was an IDs-To-Elements custom package for Dynamo 0.6 but I’m having a hard time replicating its functionality in 0.7. Maybe someone has a better idea how to implement the doc.GetElement functionality of the revit API

Edit:

Seems the method needs the UniqueId and not the ElementId to work.

2014-10-16_104524

Peter,

what is the parameter that you are getting from the wall?

Z

Zach, i Trier it on type.

@ jostein exactly the other way round.

i have a given parameter and want to extract the content with a Code Block

@ dimitar: that is not the solution for my problem. i extract the wall parameter “Type”. the result is the ID of the Parameter like “26993” the value for this parameter = “WALLTYPE1”

what i want to do is to manipulate the “WALLTYPE1” and write it to a 2nd parameter. This i tried with a code block to get a result like:

“WALLTYPE1” + “TEST” = “WALLTYPE1TEST”

what i got =

26993 + “TEST” = “26933TEST”

clear???

---- I solved the problem with standard nodes and python code. i am trying to find out a Code Block based solution.

by the way, i once published a package that extracts id, guid, id as string… works with 0.7x

@ zach: i sent my last reply from my phone… should mean i tried it on the “Type” parameter

tx peter

S T O P thinking!!!

my mistake… connected a set parameter node instead of a get parameter node…

sorry for the inconvenience!

everything working with code block like expected.

peter

Great!

Also: Grimshaw has a package called Id to Element, in which you get elements from a list of id’s (ElementId, string, integer or GUID)