Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] Report Column displays 'TotalLength' from Complex String, Line String and Line Elements

$
0
0

The following code adds two columns to a Report.  The first shows the Total Length property of Complex String elements, the second shows the Total Length property of Line String and Line elements...

AddColumn (*groupNode, L"BaseElementSchema", L"MstnComplex",
                           L"Total Length", L"TotalLength");
AddColumn (*groupNode, L"BaseElementSchema", L"MstnLineSegments",
                           L"Total Length", L"TotalLength");

Here's the AddColumn function, which is pretty much the same as the SDK Report example...

void    AddColumn            (ColumnGroupNodeR       groupNode,
                             WCharCP                schemaName,
                             WCharCP                className,
                             WCharCP                columnName,
                             WCharCP                accessString)
{
    ColumnDefinitionNodePtr columnNode = groupNode.CreateColumnDefinition (columnName, -1);
    ReportColumnAccessorList accessors;
    accessors.push_back (ReportColumnAccessor (QualifiedECAccessor (schemaName, className, accessString)));
    columnNode->SetAccessors (accessors);
    columnNode->Write ();
}

Here's what the report shows for three complex strings, one line string and one line...

What I would prefer to see is a single Total Length column.  I need somehow to merge the two column definitions. How do I achieve that goal?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>