马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
问题:
Converting Paper Space point to Model Space using AutoCAD.NET
解答:
Recently I tried to find some information on how to convert a Paper Space point to a Model Space point, and was shocked to find there was no simple to use sample code!!! Perhaps I missed something obvious, nevertheless, I opted to create my own and share it with you.
The code below utilizes the acedTrans() (which has been around since the R11 ADS days) using PInvoke, it’s very simple to use when you know how.
To run and test the code out:
Run AutoCAD and load the code below
Switch to Paper Space, either click the Layout tab or set TILEMODE=0
Create a VPort
Make sure you have TILEMODE=0
Run my “ps2ms” command and click somewhere over the MS VPort. You will see a DBPoint appear directly under your cursor, but in Model space.
If you can’t see the DBPoint, simply set PDSIZE=10 and PDMODE=98
Hope you like it.
下面是源代码
游客,本帖隐藏的内容需要积分高于 30 才可浏览,您当前积分为 0
|