用AutoCAD.NET实现转换图纸空间点到模型空间
问题: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.
下面是源代码
**** Hidden Message *****
thx for sharing!! 原文地址:https://adndevblog.typepad.com/autocad/2012/03/converting-paper-space-point-to-model-space-using-autocadnet.html 看不了啊
页:
[1]