Reference Plane orientation

Hi guys!! :slight_smile:
I created a Refeence plane by using the ReferencePlane.ByLine node.
Do you know if there is a way to change its orientation, for example by changing its normal vector or something like this?
Thank you so much

Cheers

Valentina

you could try swapping start- and endpoint.
the line.direction node may help here

1 Like

Thank you so much @Marcel_Rijsmus :slight_smile:
I’ll let you know if I work this problem out :smiley:

Unfortunately my problem persists.
Do you know if there’s a way to transform a Dynamo plane in a Revit reference plane?
I think it could be the shortest way to achieve my goal.
Thank you so much for your commitment :blush:

Hey,

Maybe this helps?

FlipRefPlane.dyn (14.7 KB)

Reference planes have a flip method…

http://www.revitapidocs.com/2018/3d4b050d-6f7a-1d67-c3c5-0fce92d5b25d.htm

Hope that’s useful,

Mark

# boilerplate from john pierson
# @60secondrevit, http://sixtysecondrevit.com
import clr

# Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

#unwrap Revit element to use with Dynamo API
rPlane = UnwrapElement(IN[0])

#start transaction
TransactionManager.Instance.EnsureInTransaction(doc)

rPlane.Flip()

# 'End' the transaction
TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable
OUT = rPlane

(maybe @john_pierson would be interested in adding this to Rhythm)

2 Likes

Thank you so much @Mark.Ackerley :blush::hugs:
I’ll let you know :slight_smile:

1 Like

to create a reference plane from a dynamo plane, create a new dynamo plane thats perpendicular and get the intersection of the two (it is a line) and create the reference plane from that line

2 Likes

Ok, I tried to run the script you kindly provided me, but the output isn’t the reference plane (as it shouls be) but 0 (and so the next node doesn’t work).
Do you know what I’m doing wrong?
Thank you so much @Mark.Ackerley :blush:

Hey,

Could you post a dyn & maybe an rvt? (or a screen grab?) :slight_smile:

Cheers,

Mark

1 Like

Sure :slight_smile:
Here it is the dyn file but unfortunately the rvt file is too big to be sent.
5. SOLETTA REV04_ref plane.dyn (153.5 KB)
So I try to post you a picture to explain my problem.

image
Here it is my viaduct model, and as you can see there is a slab (that I put in that position by using the Floor.SlabShapeByPoints node).
The very problem is that the analytical floor is stuck on its initial position:
image
and if I try to project it
image
The situation is this one (because iI don’t know how to change the direction of the normal vector of the plane after using the ReferencePlane.Line node)
I’m not sure I explained clearly my problem :sweat_smile:

Hey,

So unfortunately my Italian isn’t as good as your English :slight_smile:

But there are 2 problems,

First… you have have finished your python with OUT = 0, so that’s why you got 0…

Second… you are feeding a list, my Python was written for a single plane, try this instead (you can just copy and paste I think)

# boilerplate from john pierson
# @60secondrevit, http://sixtysecondrevit.com
import clr

# Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument

# Unwrap Revit elements for use with Dynamo API

rPlanelst = UnwrapElement(IN[0])
flprPlanelst = []

#Start the Transaction

TransactionManager.Instance.EnsureInTransaction(doc)

for rPlane in rPlanelst:
    rPlane.Flip()
    flprPlanelst.append(rPlane)

# 'End' the transaction
TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable
OUT = flprPlanelst

Hope that helps,

Mark

1 Like

Mark you are an angel :relaxed:
The funniest part in all this story is that I’ve never used Python before, so I’m quite ashamed by my own scripting errors :sweat_smile:
The other “funny” thing of this story is that I have that Revit(2019.0.1.1)-Dynamo(2.0.2) combo that presents the keyboard bug (e.g. ctrl+c and ctrl+v doesn’t work) so I’m forced to transcript the code by hand :woman_facepalming:

Hey,

Don’t worry, I’m no expert, but I would recommend a Python course, it will enable you to fill the gaps in the node libraries… Here’s a dyn :slight_smile:

Cheers,

Mark

FlipRefPlaneList.dyn (28.5 KB)
Edit: Apologies if you can’t even copy and paste between that :frowning: But writing out code is a good way of learning how it goes together :smiley: let me know if I’ve done anything wrong!

Anyway the first scritp you sent me works :partying_face: :partying_face: (I put in IN[0] an element instead of a list) and I eliminated the OUT[0] line (lol :rofl: )
Now my last goal is to use your script in a smart way in my project:)
About my transcripting work you’re definitely right :smile:
And thank you so much for the node and above all for your kindness and commitment :blush:

1 Like

With respect to Reference Plane orientations, l created multiple cross sections aligned to a curve, as per the image, however, l required to have reference planes for each section, yet l am having to create the orientated RPs manually.

Any thoughts on whether Dynamo can created an orientated RP aligned to multiple sections? I have tried, but no joy sadly.