Create a Element ID for every Point(XYZ) in a List

Hi, i have a List of Points(3d) and now i just want to create an ID for every Point.
I know it has something to do with Element.setsParameterbyName or FamilyInstancebyPoint…but i can’t figur it out.
The ID should be like, 1,2,3…1000 or Point1,Point2,…,Point1000.

Can someone help me with that?

Hello, take a look here at first: Add String to String

It depends what you want.

The simplest is GetKeys, which is an element position in the list.
But the number will not necessarily stay the same for each element if you run the Dynamo graph several times

Thank you for that Andrew and Yna. I will try it and post Results.

Well, i got a Warning: [Internal error, please report: Dereference of a non-pointer] at Element.SetParameterByName and
[FamilyInstance.ByPoint failed.Value can not be null.Parameter name: familyType] at Family.InstanceByPoint.

I think i need the FamilyInstance to get the points from Dynamo to Revit. I just want points in Revit i can work with.
In the moment, the points are only temporaly in Revit and disappear when i close Dynamo.

I can’t choose point for a Family Type…for now i use a random Typ. Is the typ important?

Any help with that would be great! Im realy confused.

The rule is quite simple: nodes won’t work if you don’t feed them with what they ask for, which means that you can’t enter a Parameter value into an Element input and neither an Element into a FamilyType input. In general, requirements are written in the description of the node. More explanations here: http://dynamoprimer.com/en/03_Anatomy-of-a-Dynamo-Definition/3-1_dynamo_nodes.html

@Hannes

What exactly do you want to achieve ?
Points don’t exist by themselves in Revit, unless within a topography, adaptive family etc
In Dynamo, you need to do something with the points, such as creating geometry or inserting a family

The screenshot is chopped off- but it doesn’t make sense- as @Yna_Db has explained.

Andrew

The entire workflow would be too big for a picture, so I had to cut it
Im trying to get points out of an xml file. Make lines out of it and get it into revit.

here is my upadate: now i got a family:) and a id for every point. (I thought that would be necessary to get the points in Revit)

With the node “DetailCurveByCurve” i try to get the Lines in Revit. But every time i got an Error saying two Elements (2 lines can not be connected)

Is there another way to get the lines in Revit? or can i fix this problem? I know the 2 ID’s for the failing lines.

I’m not sure- I am not in front of a computer with Dynamo, but you are feeding a line into the DetailCurveByCuve node, which does not look right to me (I think it needs to be a curve)

Do you specifically want detail lines in a certain view rather than model lines ?

Andrew

Hello, curves are something special in Dynamo: “Lines are the simplest form of Curves” (see here:
http://dynamoprimer.com/en/05_Geometry-for-Computational-Design/5-4_curves.html)
but as usual it must be tested…

he thx for help!
I don’t need specifically detail lines.
All i want is to get my Lines (From StartPoint to EndPoint) to Revit. So i tryed DetailCurve.ByCurve and DetailLine.ByCurve. With the same result: Error for two Elements (Lines) - they can’t connect.

If model lines stay permanently in revit, it would be too fine for me. It would be also good, if i can put them in a certain view.
But how i do this? I can’t find a note for that.

I don’t really have much time right now but I would advise yet to feed the DetailCurve node with a view selected in an OOTB Views node. It means that you can probably reach your goal by simplifying the tasks to check first where the issues are, an then complexify again…

Update: For further information about importing geometry into Revit, you can take a look here:
http://dynamoprimer.com/en/08_Dynamo-for-Revit/8-4_Creating.html