Cannot create point loads in Revit 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
1. The example to create point load in Revit 2024 API (structure) does not compile
public void CreatePointLoad(Document document)
{
// Define the location at which the PointLoad is applied. XYZ point = new XYZ(0, 0, 4);
// Define the 3d force. XYZ force = new XYZ(0, 0, -1);
// Define the 3d moment. XYZ moment = new XYZ(0, 0, 0);
PointLoad pointLoad = PointLoad.Create(document, point, force, moment, null, null);
}
2. Then I tried to first create a host, then assign a load to the host
FamilyInstance instance = _document.Create.NewFamilyInstance(curve, symbol, levelBase, structuralType);
bool isValid = PointLoad.IsValidHostId(_document, elementId);
pointLoad = PointLoad.Create(_document,instance.Id, xyz, xyzForce, xyzMoment, null);
I got error "hostElemId is not permitted to host this type of load".
Can someone show me how I can create a point load the correct way?