Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
i just more or lless got my feet wet in Revit API, so please forgive me if my question is a bit Silly.
i have Created an inclined beam and floor. i need to pick the location curve of the beam to be as a support for the floor.
i have tried it via API all is created fine except the support issue, however when i picksupport Manually(through UI) it works perfectly fine.
here is the code i have writen
//Line List IList<Line> ll = new List<Line>();
Transaction t = new Transaction(doc,"Cr. Beam"); FamilyInstance inst = null; //Create Beam if (doc.LoadFamilySymbol(path, symbolname, out symbolic)) { inst = doc.Create.NewFamilyInstance(curve, symbolic, null, StructuralType.Beam); //Get Location Curve and add to list of Lines LocationCurve beamCurve = inst.Location as LocationCurve; Line line = null; line = (Line)beamCurve.Curve; ll.Add(line); }
t.Commit()
Transaction ut = new Transaction(doc,"Cr. Slopedfloor"); ut.Start(); Floor fl = doc.Create.NewFloor(carr, false); doc.Regenerate(); foreach (Line l in ll) { fl.SlabShapeEditor.PickSupport(l); } ut.Commit();
this code is collected from diffrent parts of the original.
the error says " The input line is invalid for Suport".... i wounder should it be a special type of line to cast from Location Curve?
i hope i was clear, any Suggestions???
Solved! Go to Solution.