SlabShapeEditor

Can we remove a vertex in a SlabShapeEditor
Or we need to reset shape and re add the modified point list?

This thread seems to indicate that it went onto the wishlist but didnt progress further. I think you’re probably right that reset may be needed unless you can literally delete the vertices if they have an id.

Not sure that ‘remove point’ is needed, as it’s not going to be much different than this:

  1. Getting all the slab shape vertices
  2. For each vertex, extract the point as an XYZ
  3. Remove the XYZ you want to take out from the list
  4. Reset the slab
  5. Use the AddPoints method to get the slab with the one point removed

The problem with a new API method is the same as the problem you likely see there - “what if my point isn’t in the list of points”. “Nearest” or “anything within distance of point” both work, but they’re both quite a bit different.

I think in ideal world there would have been a method to remove at index or similar. I agree with the people in that thread that it is odd to have the ability to do nearly all but remove a nominated point when it’s possible in Revit itself. I’ve come to appreciate over the years that it is what it is, and it’s probably much more complex in practice to implement in an API sufficient manner than revit makes it appear.

1 Like

Yeah - ‘remove point by user interface selection’ certainly seems like it should be doable… but I believe the team is using something like the 5 steps above internally. Just like the split API took awhile to get added, when the ask is for “make these six lines of code one line of code instead” it is usually less impactful than “build internal and external APIs so we have toposolids”, and so those big impact things that are user facing usually have to get prioritized. If a developer who knows that part of the code frees up for a sprint or two things like deleting a point can and do get added, but it’s somewhat rare that a big fish takes less time than you thought to fry up.

1 Like