[OBD Connect Edition Update 6 C#] Creating catalog items with Bentley.Building.Api


we are trying to create instances of columns, slabs, beams, piles, etc. programmatically with the help of the Bentley.Building.Api.

So far i successfully created walls with TFLoadableWallList. There is also an c# example for TFLoadableSlabList shipped with the SDK.
The documentation hints that with a TFLoadableList I should be able to create other types of objects than walls and slabs:

"TFloadable stands for anything that can be "loaded" from a catalog. Basically if there's a placement tool that allows you to place an item from a catalog, there might be a loadable for these items. the workflow to place a loadable goes as following:

1. pick a TFCatalogItem
2. initialize loadable with the picked catalog item
3. fill in other item-specific geometry data (endpoints for wall, origin for cells, brep for slabs)
4. place the item (_getElmDscr)"

Somehow I am struggling with picking the TFCatalogItems for anything else than slabs and walls. I have the corresponding catalog items I am looking for present in my model.

TFCatalogList datagroup = new TFCatalogList();
ITFCatalog catalog = datagroup as ITFCatalog;

ITFCatalogTypeList typeList;
catalog.GetAllCatalogTypesList(0, out typeList);

ITFCatalogItemList itemList;
catalog.GetCatalogItemByNames(catalogTypeName, catalogInstanceName, 0, out itemList);
// alternative
// catalog.GetCatalogItemsByTypeName(catalogTypeName, 0, out itemList);

The same code works for walls.

Can someone clear that up and point me in the right direction (further documentation, etc.)?
Is it possible to place beams programmatically?
Is it worth looking into more recent updates of OBD?


Parents Reply Children
No Data