Replace Template and delete the tables in the drawing

原创 2015年11月19日 13:08:31


ProError UserReplaceTemplate()
{
    ProMdl curMdl;
    proErr = ProMdlCurrentGet(&curMdl);  //The drawing model
 
    ProMdl format;
    proErr = ProMdlLoad(L"J:\\workdir\\12791530\\new\\a3_asm_xmy.frm.2", PRO_MDL_UNUSED, PRO_B_FALSE, &format);
 
    ProDwgtable *tables = NULL;
    proErr = ProDrawingTablesCollect(static_cast<ProDrawing>(curMdl), &tables);
    int tableQty = 0;
    proErr = ProArraySizeGet(tables, &tableQty);
 
    ProBoolean isFromFormat = PRO_B_FALSE;
    for (int i = 0; i < tableQty; ++i)
    {
        proErr = ProDwgtableIsFromFormat(&tables[i], &isFromFormat);
        if (PRO_B_TRUE == isFromFormat)
        {
            proErr = ProDwgtableDelete(&tables[i], 0);
        }
    }
 
    proErr = ProDrawingFormatAdd(static_cast<ProDrawing>(curMdl), 0, NULL, format, 0);
 
    proErr = ProWindowRepaint(PRO_VALUE_UNUSED);
 
    proErr = ProArrayFree(reinterpret_cast<ProArray *>(&tables));
    
    return proErr;
}





相关文章推荐

Pivot tables in R with melt and cast

Reference:  Pivot Tables in R with melt and cast   If you are making the transition f...

Dropping and creating tables in read only tablespaces?!

You probably already know that it’s possible to drop tables in Oracle read only tablespaces… (You di...
  • loryliu
  • loryliu
  • 2015年12月14日 22:03
  • 292

Partitioned Tables and Indexes in SQL Server 2005

Partitioned Tables and Indexes in SQL Server 2005 SQL Server 2005  Kimberly L. Tripp ...

malloc/free and new/delete in C++

转自:http://www.pixelstech.net/article/index.php?id=1340193129 malloc and free are C++/C language ...

Path Sum and Delete Node in a Linked List

今天照例更新数据结构基础,希望各位各取所需,我本人是习惯通过题目通过code来加深对数据结构以及某些算法的理解。现在首先我们还是来看看二叉树相关的题目: Path sum,leetcode上给出的演...

Insert, Update, Delete in ASP.NET Gridview, DataSource as SQL Server, MS Access (mdb/accdb), XML and

This demo is a continuation of my previous example “Binding GridView with Data”. If you are not fami...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Replace Template and delete the tables in the drawing
举报原因:
原因补充:

(最多只允许输入30个字)