Unwanted Element in Element.GetLocation

I need help in trying to get rid of line that is found in Element.GetLocation. I selected only Structural Columns but some how This line pass through the System. Is there a way i can fine this line and get rid of it, or is their an easier way?

Annotation 2023-07-12 113959

Likely a slanted column. Note that if you remove this the association with the elements, however you can use a List.RemoveIfNot with the geometry list as the list input, and the string “Point” as the type input.

1 Like

Thank you for responding but can you give a visual representation of what I should do?

Not at my CPU at the moment, but itMs pretty straight forward. Put a List.RemoveIfNot node on canvas, wire the node you put a screenshot of into the list input, and then put a String node into the other input and write ‘Point’ in it and the resulting list should just be the points from the geometry list.

This is an example of how it it assembled in another context: Dynamo Dictionary

If you remove the Line are you not then going to end up with 1 Column less on your list, and therefore be missing whatever this script is doing for that one column?

If the goal is to get the centrepoint location of the columns is it not then better to impliment logic whereever there is a slanted column to take the point at curve 0.5 to get its relative location and replace the problem mentioned above with that item instead?

Or am i simply overthinking this?

well im gonna try to explain this to the best of my ability, you have to know im new to dynamo and im a visual learner. So i have a [Element.GetLocation] that is abstracting data from [All Elements of Category], to which im connecting it to a [Point.X], [Point.Y], and a [Point.Z]. from what I understand those points x,y, and z points will look at that Line from the [Element.GetLocation] and see it as a null cuasing those x,y, and z points not to work and then i get message saying that I need to convert non-convertible types. I tried using a drop Null, or clear list, SOMETHING, to get rid of these line or just forcing those x,y, and z points to accept it.

If anybody needs to pictures i will be glad to see them, but i suck at pasting pictures on here cus its blurry. or anyone can do i zoom call i don’t know, all i know is i need help :sweat_smile:

Once you get the X, Y, and Z data what are you going to do with them? It may be best to filter the elements by their location type as a first step.

From your list of selected elements:

  1. Select all your columns using whatever method you currently have. This is your starting point.
  2. Use an Element.GetLocation to get the location of each column. Right click on this node and disable the preview to disable the display as we won’t need it anymore.
  3. Use an Object.Type node from the GetLocation node to find out what the object type is.
  4. Use a String.Contains node where the string is the string input is the result of the Object.Type node and the searchFor input is a string node with a value of “Point”. The result of this node will be a list of booleans (true/false values).
  5. lastly Use a List.FilterByBoolMask node where the list input is the list of all the columns you had selected (step 1) and the mask is the list of true and false values from the String.Contains node (step 4). The ‘in’ output will be elements which have a location that is point based - so you can use an Element.GetLocation node and proceed down your point.X, point.Y, and Point.Z stuff on them as you currently are. The ‘out’ output will be the list of columns which have a line based location, and so you’ll want to pull the point on them - Curve.PointAtParameter should work with a parameter of 0 for the start, 0.5 for the middle, and 1 for the end.

Give it a shot and post where you get and the community will do what we can to help. :slight_smile:

Use the export canvas as image feature by zooming so you can read one node clearly, and hitting the camera or ‘export’ button just outside the upper right corner of the workspace. Save that image and post it here or on a 3rd party service (if you lack permissions here) and link us to it.

Do i have to use a [Code Block “line”;] and attack it to the [SearchFor] connector on the String.Contains?

Hello, if it can help


1 Like

Thank you problem fix, also on my post i have a topic called array nodes if you can, please take look at it?

thank you, also if you want take look at one of my topics “array nodes” if you want to take a look at it?

1 Like