Get section line curve

Hi, could someone please show me how to get the curve of a section line so I can move the section?

there is this post but I cant see it and thought there might be a way now?

I don’t think is possible there are no Properties in the API for getting location line of sections. Also there are no methods for setting a section view location exposed in the Revit API.

https://www.revitapidocs.com/2020/0d37c868-8b5e-3ebd-d037-15b3c993f0d6.htm?section=methodTableToggle

Edit: Perhaps you can create a new view in the location you want a delete the old one automatically in a Dynamo script. This is kinda tricky though.

1 Like

Tried to make a new section using the created one and transforming it but got this error below :thinking: Think I need the coordinate system of the center of the surface patch. I dont know how to get the coordinate system pointing in the correct direction off the surface

Used this post for the info

… I dono

off to the funny farm

Also tried this website method, no luck

have I approached this all wrong because the view bounding box dosn’t relate to the plan view?

Got it to work but what I dont understand is why these min and max points wont work with it. They seem to appear correctly where youd want them in dynamo

Well thats super confusing. The blue is the min and max that created the view. The red is what I thought would make the view from the crop box. So somethings totally off axis I dont understand yet

Well this works. Why, I dont know. its slightly off on the location but Ill figure out why in time. If anyone ends up interested in this.


@vanman ElementTranformUtils :wink:



Move Section By Curve in Active View.dyn (43.9 KB)

5 Likes

There he is! The master at it. Thanks so much! I’m gonna loose my job if I dont get back to normal work soon :rofl: but looking forward to giving this a go! Will be so much easier. Ill get to keep the views templates and things that it copys through with too :partying_face:

1 Like

With the Genius Loci package, this only requires a few nodes :


Move ViewSection.dyn (16.0 KB)

6 Likes

Defeated, not sure why its not moving it to the correct location. The blue lines in revit look like the right place. Alban gets that error

Is the node trying to move the view in the Active view still or is it a bit lost? Try removing the section of python that defines what happens if the code is successful, and put the ElementTransforUtils command in the ‘top’ level of code. Then you can see what errors occur.

If still an issue, I am in the office this afternoon and will post an example.

It moved the section. Just somewhere crazy I cant find it I think

Hmm sounds like a co-ordinate system issue then. What happens if you remove the transforms?

1 Like

Ok I think its something to do with this metric conversion here. Need to convert the transformed geometry length maybe

This is it! Just need to test if your handy move ElementTransform accepts lists :slight_smile:

1 Like

Should be an easy tweak :wink:

epp for me or you :rofl: I’ve dabbled in trying to get python to take lists before with no luck :crazy_face: