LevelOffset not working for Arc extrusion Roof
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've encountered a strange result and I'd like to know if it's my fault or if there's an error somewhere or a known issue.
I'm trying to create a new ExtrusionRoof with an arc profile and then change the Level Offset parameter to a different value.
I use the ROOF_CONSTRAINT_OFFSET_PARAM BuiltInParameter to find that parameter and then set it.
Unexpectedly Revit set the parameter to my value, but the roof doesn't shift. So there's a discrepancy between the parameter value and the effective position of the roof.
I tried to manually change the value, but the roof doesn't shift... it seems like it has a constraint that I can't figure out. I tested methods like Arc.Create(plane,radius,startAngle,endAngle) and Arc.Create(XYZ,XYZ,XYZ) to create the arc profile for the NewExtrusionRoof but nothing changes. Here's a snippet of my code:
double myOffset=1.5;
CurveArray curArr=new CurveArray();
Arc arc = Arc.Create(arc_end0, arc_end1, arc_pointOnCurve);
//Arc arc=Arc.Create(plane,radius,startAngle,endAngle);
curArr.Append(arc);
using (Transaction t=new Transaction(curDoc,"Create ExtRoof"))
{
t.Start();
ExtrusionRoof extrusionRoof = curDoc.Create.NewExtrusionRoof(curArr, rp, level, roofType, extrusionStart, extrusionEnd);
Parameter offset = extrusionRoof.get_Parameter(BuiltInParameter.ROOF_CONSTRAINT_OFFSET_PARAM);
offset.Set(myOffset);
t.Commit();
}
Any ideas?
Thanks in advance