How to find start/end of ramp in revit, perhaps with sketches?

Assuming that your Ramp is a FamilyInstance : var fecRamps = new FilteredElementCollector(doc) .OfClass(typeof(FamilyInstance)) .Where(pElt => { int lCatId = pElt.Category.Id.IntegerValue; return lCatId == (int)BuiltInCategory.OST_Ramps; }) .OfType<FamilyInstance>() .ToList(); List<XYZ> lRampLocs = new List<XYZ>(); foreach (var pFam in fecRamps) { var fLoc = pFam.Location as LocationCurve; var fRampSide1 = new XYZ(fLoc.Curve.GetEndPoint(0); var fRampSide2 = new XYZ(fLoc.Curve.GetEndPoint(1); … Read more

System.BadImageFormatException An attempt was made to load a program with an incorrect format

It’s possibly a 32 – 64 bits mismatch. If you’re running on a 64-bit OS, the Assembly RevitAPI may be compiled as 32-bit and your process as 64-bit or “Any CPU”. Or, the RevitAPI is compiled as 64-bit and your process is compiled as 32-bit or “Any CPU” and running on a 32-bit OS.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)