I can easily retrieve the builtin parameter BuiltInParameter.ROOM_CALCULATION_POINT, however has anyone managed to retrieve the coordinate point for the actual point inside the famdoc that you can move around so that families are discoverable within rooms? If this is not possible is there any workaround? Does this affect the extent of the bounding box for the loadable model family?
Solved! Go to Solution.
Solved by FAIR59. Go to Solution.
easy:
SpatialElementCalculationPoint sPoint;
sPoint.Position = new XYZ(2, 2, 2);
Hi This is great just what I have been looking for...
Just one problem, I can't get the SpatialElementCalculationPoint reference in the family editor, do you know what I might be doing wrong?
many thanx
You have to check the Family Parameter "Room Calculation Point" , to obtain the SpatialElementCalculationPoint.
FamilyDocument.OwnerFamily.get_Parameter(BuiltInParameter.ROOM_CALCULATION_POINT).Set(1);
Thanx again I had that point covered already.
What I am not getting is the sPoint, I don't have a lot of experience with the family editor side of the revit api. So the following i'm getting an error stating that the sPoint is not set to anything...
SpatialElementCalculationPoint sPoint;
sPoint.Position = new XYZ(2, 2, 2);
Is the sPoint derived from the FamDoc, OwnerFamily, getGeometry a builtInParameter that is cast or parameter definition? Just lost here and some background might help me from asking too many questions in the future. Plus I have googled quite a bit and found very few references to the SpatialElementCalculationPoint
the class definition for SpatialElementCalculationPoint is:
public class SpatialElementCalculationPoint : SpatialElementCalculationLocation
the class definition for SpatialElementCalculationLocation is:
public class SpatialElementCalculationLocation : Element
so the SpatialElementCalculationPoint is an Element and can be obtained by a FilteredElementCollector.
SpatialElementCalculationPoint sPoint = new FilteredElementCollector(doc) .OfClass(typeof(SpatialElementCalculationPoint)) .Cast<SpatialElementCalculationPoint>() .ToList().FirstOrDefault();
Can't find what you're looking for? Ask the community or share your knowledge.