When you define Beams in Revit Structure the software automatically draws a driving line on top of the Beam. That line will meet a same line from a Column and their meeting point will actually become a node. So the “z-Direction Justification” is a property of Beams that describes the vertical position of the beam related with the imaginary line that connects the start and end point of the Beam. This parameter can get 3 different values TOP / CENTER / BOTTOM and we imagine the difference.
So using the SAP_2_ RS tool, we needed to set the z-Direction Justification to CENTER in order to be precise and the code is the following.(the default value is on TOP)
myBeam = myModel.Create.NewFamilyInstance(myBeamLine, beam_sym, my_level, Autodesk.Revit.DB.Structure.StructuralType.Beam)
‘giving the right z Direction Justification
Dim V_justification As Autodesk.Revit.DB.BuiltInParameter = Autodesk.Revit.DB.BuiltInParameter.BEAM_V_JUSTIFICATION
Dim myParameter As Autodesk.Revit.DB.Parameter = myBeam.Parameter(V_justification)
myParameter.[Set](1) ’ here: 0 is Top / 1 is Center / 2 is Bottom
These lines need to be used after “drawing” the beam and this is the way to approach and change other parameters of elements if needed.. (got a lot of intelligense there)