CAD.ARX获得当前的视图设置
AcDbViewTableRecord GetCurrentView()
{
AcDbViewTableRecord view;
struct resbuf rb;
struct resbuf wcs, ucs, dcs; // 转换坐标时使用的坐标系统标记
wcs.restype = RTSHORT;
wcs.resval.rint = 0;
ucs.restype = RTSHORT;
ucs.resval.rint = 1;
dcs.restype = RTSHORT;
dcs.resval.rint = 2;
// 获得当前视口的“查看”模式
acedGetVar(“VIEWMODE”, &rb);
view.setPerspectiveEnabled(rb.resval.rint & 1);
view.setFrontClipEnabled(rb.resval.rint & 2);
view.setBackClipEnabled(rb.resval.rint & 4);
view.setFrontClipAtEye(!(rb.resval.rint & 16));
// 当前视口中视图的中心点(UCS坐标)
acedGetVar(“VI

这段代码展示了如何在CAD.ARX中获取当前视图的详细设置,包括视角模式、中心点、镜头焦距、目标点、观察方向、视图高度、屏幕大小、视图扭转角以及剪裁平面距离等。
最低0.47元/天 解锁文章
2778

被折叠的 条评论
为什么被折叠?



