How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.
Unable to create opening on a created floor, posted error "circular chain of reference"
Problem is floor can be create while not the opening, here are the codes:
CurveArray curveArray = new CurveArray();
curveArray.Append(Line.CreateBound(new XYZ(-50, 50, 3000/304.8), new XYZ(50, 50, 3000 / 304.8)));
curveArray.Append(Line.CreateBound(new XYZ(50, 50, 3000 / 304.8), new XYZ(50, -50, 3000 / 304.8)));
curveArray.Append(Line.CreateBound(new XYZ(50, -50, 3000 / 304.8), new XYZ(-50, -50, 3000 / 304.8)));
curveArray.Append(Line.CreateBound(new XYZ(-50, -50, 3000 / 304.8), new XYZ(-50, 50, 3000 / 304.8)));
CurveArray curveArray1 = new CurveArray();
curveArray1.Append(Line.CreateBound(new XYZ(10, 30, 3000 / 304.8), new XYZ(30, 30, 3000 / 304.8)));
curveArray1.Append(Line.CreateBound(new XYZ(30, 30, 3000 / 304.8), new XYZ(20, 10, 3000 / 304.8)));
curveArray1.Append(Line.CreateBound(new XYZ(20, 10, 3000 / 304.8), new XYZ(10, 30, 3000 / 304.8)));
ElementId levelid = new ElementId(2787);
Level level = doc.GetElement(levelid) as Level;
FloorType floorType = floorTypeFilter(doc, "常规 - 300mm");
Floor newFloor = doc.Create.NewFloor(curveArray,floorType , level, false);
Element NewFloor = newFloor as Element;
Opening opening = doc.Create.NewOpening(newFloor, curveArray1, false);
Solved! Go to Solution.
Try to regenerate the model after creating the floor and before creating the opening.
If that does not help, try to commit the transaction after after creating the floor and create the opening in a new separate transaction.
If using two or more transactions, you can group them.
Read all about the need to regenerate here:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.33
Cheers,
Jeremy
Dear Mr.Tammik
Thank you for replying, now the problem is solved by regenerating and I can make opening like that
Best Wishes
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name