明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 5365|回复: 14

关于.NET调试等的一些问题

  [复制链接]
发表于 2004-4-30 22:06 | 显示全部楼层 |阅读模式
1).NET开发ACAD和以前用VBA大不一样.VBA中,那些立即窗口,本地窗口.监视窗口,F8,CTRL+F8用的很方便,.NET就不一样了,调试工作很不方便,该如何是好? 2).NET的语法和VBA差别也很大.VBA中:ThisDrawing.SendCommand "UCS W "能使UCS转为世界坐标系,.NET就不行了,该怎么改啊! 3)UCS问题:如何得到当前的UCS,使后面的作图都在此UCS下进行!如何将此UCS返回给一个变量?用SendCommand方法建立的UCS如何返回给一个变量? 先提这些问题,等待您的指导,谢谢了!
发表于 2004-5-3 10:25 | 显示全部楼层
1、是否可以先将工程类型改为应用程序,ACadApp用GetObject函数获得,调试成功后再改为类库
 楼主| 发表于 2004-5-3 10:34 | 显示全部楼层
谢谢lzh741206! 本论坛斑竹暂缺,最佳人选是……
发表于 2004-5-3 10:35 | 显示全部楼层
2、看看这段话有没有帮助

You define a UCS to change the location of the (0, 0, 0) origin point and the orientation of the XY plane and the Z axis. You can locate and orient a UCS anywhere in 3D space, and you can define as many UCSs as you require.

All coordinates in ActiveX Automation are entered in the world coordinate system (WCS). Use the MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_getucsmatrix.htm" target="_blank" >GetUCSMatrix method to return the transformation matrix of a given UCS. Use this transformation matrix to find the equivalent WCS coordinates.

Use the MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_ucsiconon.htm" target="_blank" >UCSIconOn property to turn the UCS icon on or off for a given viewport.

To make a UCS active, use the MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_activeucs.htm" target="_blank" >ActiveUCS property on the Document object. If changes are made to the active UCS, the new UCS object must be reset as the active UCS for the changes to appear. To reset the active UCS, simply call the ActiveUCS property again with the updated UCS object.

To add a new UCS to the drawing, use the MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_add.htm" target="_blank" >Add method off the UCSs Collection. To edit or query an existing UCS, use the following methods and properties: [WEB]http://www.mjtd.com/object/acad2004/idh_ucs_object.htm[/WEB]

 楼主| 发表于 2004-5-3 18:18 | 显示全部楼层
lzh741206发表于2004-5-3 10:25:001、是否可以先将工程类型改为应用程序,ACadApp用GetObject函数获得,调试成功后再改为类库


.net中窗体如何关?


VB6中,unload Form1便可,.NET怎么办?
发表于 2004-5-3 19:26 | 显示全部楼层
本帖最后由 作者 于 2004-5-4 14:01:56 编辑

me.Close
发表于 2004-5-4 14:03 | 显示全部楼层
这两天机子重装,郁闷
 楼主| 发表于 2004-5-4 18:07 | 显示全部楼层
lzh741206发表于2004-5-3 19:26:00me.Close
谢谢! 第二个问题我也解决了. SendCommand( "UCS " & VBCR & "w" & VBCR) 第三个,等待啊!!
发表于 2004-5-4 18:29 | 显示全部楼层
看看上面那段E文,是从帮助里Copy出来的 用MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_activeucs.htm" target="_blank" >ActiveUCS获取和设置当前UCS
 楼主| 发表于 2004-5-4 21:18 | 显示全部楼层
lzh741206发表于2004-5-4 18:29:00看看上面那段E文,是从帮助里Copy出来的 用<A href=\"mkMSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_activeucs.htm\" target=\"_bl...

不错,是要用MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_activeucs.htm" target="_blank" >ActiveUCS.不过只有将当前UCS返回给一个变量,MSITStore:D:\Program%20Files\AutoCAD%202005\help\acadauto.chm::/idh_activeucs.htm" target="_blank" >ActiveUCS才能有用武之地啊!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-20 17:01 , Processed in 0.298070 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表