找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1203|回复: 0

ActiveX/VBA Technical Newsletter - March 2000

[复制链接]

已领礼包: 145个

财富等级: 日进斗金

发表于 2002-1-7 01:56:16 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
ActiveX/VBA Technical Newsletter - March 2000  
This document is part of    AutoCAD VB(A) Newsletter Archive     



/Note: Have you missed a Newsletter issue? Visit our Newsletter archive at
the following URL:/

http://adn.autodesk.com/techsupp/docs/newsletters.htm
  

Dear AutoCAD ActiveX/VBA developer,

1- Extending VBA at runtime
---------------------------
  
VB(A) is a Microsoft product licensed to Autodesk for enabling VB style
programming for customization on a number of Autodesk products such as
Actrix / AutoCAD. The current version of VBA used in AutoCAD 2000 is
version 5.3, and version 6 for Actrix 2000. One feature which is not
documented, is that the VB(A) engine has an ActiveX interface. This
gives you the ability to extend your code at runtime. The AutoCAD
IApplication interface has a VBE property which is the reference to
that extension. To make use of this extension, you need to make a
references to the

'Microsoft Visual Basic for Applications Extensibility 5.3'

from AutoCAD's VB(A). Then you will be able to benefit form all the
features that this extension has to offer.
  
Also you can load / save VB(A) projects from the AutoCAD ActiveX interface,
as well as executing a new VB(A) macro (i.e. AcadApplication.RunMacro()).
But, there is a defect in the AutoCAD 2000 shipping release (T.0.98) which
may cause problem in case you are using the SendCommand() method. The
solution below provides a workaround for this defect.

Sendcommand method runs asynchronously if called in VBA macro
/cgi-bin/solution.pl?SID=29983
  
2- Getting AutoCAD start parameters
-----------------------------------
  
Question
  
How can you obtain AutoCAD startup parameters with VBA?
  
Answer

Note: Refer to the Win32API.TXT document which is located in a sub
directory of Visual Studio in conjunction with the information outlined
below.
  
There is no direct VBA API that will allow you do this, however you can
utilize the WIN32 API to find the startup parameters for AutoCAD.
First, you should declare the Win32 function as stated in the Win32API.txt
document, which is located in a sub directory of Visual Studio. Get the
return value, (in this case, a string) by calling this function. Retrieve the
switch parameters from the return string. Please note the first parameter is
the execution program name and the parameters that follow (if any) are
separated by spaces.
  
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As String
  
Sub GetCmdLine()
Dim str As String
str = GetCommandLine()
MsgBox "AutoCAD switches are " & str, , "Command Line"
End Sub
  
/cgi-bin/solution.pl?SID=41743
  
  
3- New and updated solutions
----------------------------
  
New and updated solutions are available at:
  
/scripts/whatsnew.pl
  
or
  
http://adn.autodesk.com/techsupp/apikb/whatsnew2.htm
  

-----------------------------------------------------------------------------
To subscribe or unsubscribe, go to
http://adn.autodesk.com/techsupp/docs/newsletters.htm
-----------------------------------------------------------------------------

You received this message as a result of your registration
on the ADN List Server subscription page.  If you no longer wish
to receive these messages, read the next section, How to use this
mailing list.

How to use this mailing list:

You may unsubscribe from this e-mail newsletter, or subscribe to
a variety of other informative e-mail newsletters, by returning
to the ADN List Server subscription page at
http://adn.autodesk.com/techsupp/docs/newsletters.htm
and changing your subscription preferences.

Alternatively, from the subscribed account you can send an e-mail to
<Majordomo-partnersys@autodesk.com> with the following command in the
body of your email message:

unsubscribe <list-name>

----------------------------------------------------------------------

Autodesk Developer Network (ADN) information and events:

For information on all ADN topics, please visit:
  http://www.autodesk.com/adn

----------------------------------------------------------------------

THIS DOCUMENT IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.  The
information contained in this document represents the current view of
Autodesk Inc. on the issues discussed as of the date of publication.
Because Autodesk must respond to change in market conditions, it
should not be interpreted to be a commitment on the part of Autodesk
and Autodesk cannot guarantee the accuracy of any information
presented after the date of publication.
INFORMATION PROVIDED IN THIS DOCUMENT IS PROVIDED 'AS IS' WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND FREEDOM FROM INFRINGEMENT.
The user assumes the entire risk as to the accuracy and the use of
this document. This  document may be copied and distributed subject to
the following conditions:
1.   All text must be copied without modification and all pages must
     be included
2.   All copies must contain Autodesk's copyright notice and any other
     notices provided therein
3.   This document may not be distributed for profit
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-12-5 03:07 , Processed in 0.389413 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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