- UID
- 1
- 积分
- 15892
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-1-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
GETTING VIEWPORT INFORMATION
Product AUTOCAD Author ODIET,NATHALIE
Date 01-SEP-97 Document ID 1733
Expiration date Attachments
Keywords ACDBVIEWPORT, VIEWPORT, ACDBGETCURVIEWPORTOBJECTID,SYTEM = VARIA
Developer Consulting Group technical solution. Autodesk confidential, for ADN members only. Please read the disclaimer
Question
How can I obtain an acdbviewport associated with the current viewport ?
Answer
In Tilemode 0, you can use acdbGetCurViewportObjectId() to obtain the
objectId of the current viewport.
In Tilemode 1, you can only obtain information about the viewports from the
system variables or from within a custom object's viewportDraw() member. I
listed the system variables of interest here along with their meaning (for
more information see the AutoCAD Command Reference) and the corresponding
AcDbViewport member function that would be used if in Tilemode =0 to get the
same data. Note that some of these variables are read-only and can only be
set using ads_command with the proper AutoCAD command.
BACKZ - back clipping plane (backClipDistance)
FRONTZ - front clipping plane (frontClipDistance)
LENSLENGTH - lens length (for perspective) (lensLength)
TARGET - camera target point (viewTarget)
VIEWCTR - the view's center (viewCenter)
VIEWDIR - view direction as vector offset of target (viewDirection)
VIEWMODE - current mode, clip, perspective, follow (isPerspectiveOn,
isFrontClipOn, isBackClipOn, isFrontClipAtEyeOn, isUcsFollowModeOn)
VIEWSIZE - current viewport height (viewHeight)
VIEWTWIST - view twist angle (twistAngle)
VSMAX - upper right corner (centerPoint,height,widht)
VSMIN - lower left corner (centerPoint,height,widht)
GRIDMODE - grid on/off (isGridOn)
GRIDUNIT - grid increments (gridIncrement)
SNAPUNIT - snap incrments (snapIncrement)
SNAPANG - snap and grid angle (snapAngle)
SNAPBASE - snap and grid origin (snapBasePoint)
SNAPISOPAIR - which isometric plane (snapIsoPair)
SNAPMODE - snap on/off (isSnapOn)
SNAPSTYL - snap style (isSnapIsometric
UCSICON - ucs visibility (isUcsIconVisible,isUcsIconAtOrigin)
UCSFOLLOW - view plan to ucs (isUcsFollowModeOn)
Disclaimer
This information is derived from a response to a specific question sent to the Developer Consulting Group at Autodesk, and thus given its nature, is subject to change without notice. The information is provided to you on an "as is" basis, and you may use it only at your own risk. Autodesk is not responsible for its quality, nor shall it be liable for any damage or loss caused by your use of this information.
Top |
|