Overview
Some model objects support additional interface to describe their parametric representation. Now they are IWallParams, IColumnParams, IFloorParams, IBeamParams that can be queried from corresponding objects. Receiving the representation of other objects is under development as well as editing.
How to obtain the parametric representation
The code below demonstrates how to get beam parametric representation.
C++
auto pProject = m_pApplication->GetProject();
auto pBeamStyleManager = pProject->BeamStyleManager;
auto pModelObjects = pProject->Model->GetObjects();
for (int i = 0; i < pModelObjects->Count; i++)
{
auto pModelObject = pModelObjects->GetByIndex(i);
Renga::IBeamParamsPtr pBeamParams;
pModelObject->QueryInterface(&pBeamParams);
if (pBeamParams)
{
auto pBaseLineInLevelSpace = pBeamParams->GetBaseline();
auto pProfile = pBeamStyleManager->GetBeamStyle(pBeamParams->StyleId)->Profile;
auto pProfilePlacement = pBeamParams->GetProfilePlacement();
}
}
C#
var project = m_app.Project;
var beamStyleManager = project.BeamStyleManager;
var modelObjects = project.Model.GetObjects();
for (int i = 0; i < modelObjects.Count; i++)
{
var modelObject = modelObjects.GetByIndex(i);
var beamParams = modelObject as Renga.IBeamParams;
if (beamParams != null)
{
auto pBaseLineInLevelSpace = pBeamParams->GetBaseline();
auto pProfile = pBeamStyleManager->GetBeamStyle(pBeamParams->StyleId)->Profile;
auto pProfilePlacement = pBeamParams->GetProfilePlacement();
}
}
See also
Related samples