Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
Hello everyone. I am now experiencing a problem where the stair run is offset when the actual run width is not equal to 1000mm. Is there anyone who can identify the potential problem?
When the actual run width is 1000mm:
When the actual run width is 1500mm:
When the actual run width is 500mm:
Below is the codes to create the run:
Line locationLine = Line.CreateBound(new XYZ(startPoint.X, startPoint.Y, topLevel.Elevation), new XYZ(endPoint.X, endPoint.Y, topLevel.Elevation));
StairsRunJustification orientation = StairsRunJustification.Left;
if (staircase.Orientation == StaircaseOrientation.ToLeft)
{
orientation = StairsRunJustification.Right;
}
StairsRun newRun2 = StairsRun.CreateStraightRun(doc, newStairsId, locationLine, orientation);
newRun2.ActualRunWidth = ConverterHelper.MmToFoot(flight.Width);
newRun2.BeginsWithRiser = true;
newRun2.EndsWithRiser = false;
newRun2.BaseElevation = ConverterHelper.MmToFoot(staircase.Start.Z);
newRun2.TopElevation = ConverterHelper.MmToFoot(staircase.End.Z);
var runType = doc.GetElement(newRun2.GetTypeId()) as StairsRunType;
runType.StructuralDepth = ConverterHelper.MmToFoot(staircase.FlightElements[0].WaistThickness);
stair.get_Parameter(BuiltInParameter.ALL_MODEL_MARK).Set(staircase.Label);
stair.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS).Set(staircase.ID);
t.Commit();
I cannot read your code. It would be easier to read as text, rather than an image. There is a button above the editor to Insert/Edit code sample.
Hi, I have changed the codes from image to text. Thanks in advance for you help.
Can't find what you're looking for? Ask the community or share your knowledge.