dim aCADapp As AcadApplication 'AutoCAD 的application对象 dim aCADdoc As AcadDocument 'AutoCAD document对象 Dim sset As AcadSelectionSet
Set aCADapp = GetObject(, "autoCAD.application") Set aCADdoc = aCADapp.ActiveDocument aCADapp.Visible = True '此语句是使CAD可见。 Set sset = aCADdoc.SelectionSets.Add("SelectText") Dim FilterType As Integer, FilterData As String FilterType = 0 FilterData = "TEXT" sset.SelectOnScreen 'sset.SelectOnScreen FilterType, FilterData
以上是我的代码,意思是只想选择文字的内容,但在实际运行时只能用"sset.SelectOnScreen",而在用"sset.SelectOnScreen FilterType, FilterData"就出错.
|