Extracting xyz coordinates

Hi There, I need some help in extracting x, y, z coordinates from a adoptive family instance and fill the Text Parameter group which has setout points x, y and z parameters in the family. What I have done so far is given below. I have checked few forums and haven’t found a solution yet. If anyone could direct me to the correct process or refine what I have up to now would be much appreciated. Thanks.

Hi @HarenG

Are you trying to get x,y,z values, create parameter and set the values at the same time?

Yes, I want to extract the xyz values and set the parameter values. Thanks

I receive the following error message for “Parameter.CreateProjectParameter”:

Warning: One or more of the input types are not matching. Couldn’t find a version of CreateProjectParameter that takes arguments of type (string,string,string,string,bool,__array)

Hi @HarenG

I don’t know if what you are attempting can be done without a PassThrough node, but the error you are getting is because you are feeding doubles into a text parameter. Try to insert a ‘String from object’ node between your Point.X and categoryList port in the Parameter.CreateProjectParameter node. If you are writing your XYZ values into seperate parameters, then I don’t see the need for the List.Create node.

Edit: If I had to perform what you are attempting, then I’d just create the three parameters manually, and then write the values into them via Dynamo (Unless I had to do it in several Revit files).

@MartinSpence, I need to do this for more than 800 instances and the value has to be set in the already present Shared Parameter SOP_X and …y and …z so that I could schedule the set out point of the adoptive component family. I tried String from object between category list but still did not result but created a new set of NULL entries of the above Parameters.

If the Param is already present in the model, then use element.setparameterbyname to set the values :slightly_smiling_face:

Hi Martin, Thanks for the tip. I have now tried that and it actually creates a NULL entry in the Parameter, but the Element.SetParameterByName has gone yellow and indicates Operation failed the Parameter is read only?. By the way they are shared parameters.
What I have is a nested Adoptive component marker to Identify a set out point on a structural frame on a Bridge. So that I can schedule the coordinate points of the Setout Points for each instance.

Ok. It sounds like there are more to take into consideration than what you presented in your first post. Can you upload a dummy rvt file with the family as it is setup? That would make it so much easier to help you.