www.mxdraw.com
内容索引主面
前一个向上下一个
MxDrawXCustomFunction::Mx_GetViewportEntity 方法

得到视口内所有显示的对象。

IDL
static McDbObjectIdArray Mx_GetViewportEntity(McDbObjectId idViewport);
参数 
说明 
McDbObjectId idViewport 
这个是视口id. 

例如: C#代码

            MxDrawSelectionSet ss = new MxDrawSelectionSet();
            MxDrawResbuf filter = new MxDrawResbuf();
            filter.AddStringEx("VIEWPORT", 5020);

            // 得到图上所有视口.
            ss.AllSelect(filter);
            Int64 iEntId = 0;
            for (int i = 0; i < ss.Count; i++)
            {
                MxDrawResbuf param = new MxDrawResbuf();
                param.AddObjectId(ss.Item(i).ObjectID);
                MxDrawResbuf ret = (MxDrawResbuf) axMxDrawX1.CallEx("Mx_GetViewportEntity", param);

                for (int k = 1; k < ret.Count; k++)
                {

                    iEntId = ret.AtObjectId(k);

                }
            }
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!