AECCIPE/Structure是否总是返回false
有人知道为什么吗;是AECCIPE“;和“;是AeccStructure“;一直返回false?昨晚同样的代码工作了,但自从我的CAD崩溃后,同样的代码就不再是了;t认识到我画的管道实际上是一个管道,我可以#039;我不明白为什么…Dim spsPipe As AeccPipe
Dim spsAcadObj As AcadObject
Dim spsPoint As Variant
Dim spsStructure As AeccStructure
Dim spsPipeStyle As AeccPipeStyle
Dim spsStructureStyle As AeccStructureStyle
Dim spsApp As AcadApplication
Set spsApp = ThisDrawing.Application
Dim spsAppName As String
spsAppName = "AeccXUiPipe.AeccPipeApplication.10.5"
Dim spsPipeApplication As AeccPipeApplication
Set spsPipeApplication = spsApp.GetInterfaceObject(spsAppName)
Dim spsPipeDocument As AeccPipeDocument
Set spsPipeDocument = spsPipeApplication.ActiveDocument
x = False
Do Until x = True
ThisDrawing.Utility.GetEntity spsAcadObj, spsPoint, vbLf & "Select pipe"
If (TypeOf spsAcadObj Is AeccPipe) Then
作为测试,我在ThisDrawing.GetEntity…Msgbox spsAcadObj.ObjectName 这确实返回了“;AeccDBPipe“; 有人解决了这个问题吗 ;我在vba中有一个管网实用程序,在AutoCAD中使用了几年 ;现在,在2020年搬迁到一家新公司后,它没有发挥作用 ;此外,在安装2020 service pack 2后,它甚至无法通过AeccXUiPipe.AeccPipeApplication.13.2的分配;本周早些时候,我可以让它通过这个,然后遍历图形中的对象,但是对象。名称是AeccDbPipe,不会在AeccPipe中键入
 
将oApp Dim作为应用程序设置为oApp=ThisDrawing。应用程序将sAppName设置为字符串;AeccXUiPipe.AeccPipeApplication.13.2“
将oPipeApplication设置为AECCIPeappication。GetInterfaceObject(sAppName)
&039;获取对当前活动文档的引用
将oPipeDocument设置为AeccPipeDocument。ActiveDocument ; 不是你问题的答案,而是一种通用方法。有两种方法可以通过版本或注册表查找CIV3d的版本号,只是其他人可能想要使用,并且没有2020版本((vl-string-search "R17.2" vrsn) (setq appstr "6.0")) ;09
((vl-string-search "R18.0" vrsn) (setq appstr "7.0")) ;2010
((vl-string-search "R18.1" vrsn) (setq appstr "8.0")) ;2011
((vl-string-search "R18.2" vrsn) (setq appstr "9.0")) ;2012
((vl-string-search "R19.0" vrsn) (setq appstr "10.0")) ;2013
((vl-string-search "R19.1" vrsn)(setq appstr "10.3"));;2014
((vl-string-search "R20.0" vrsn)(setq appstr "10.4"));;2015
((vl-string-search "R20.1" vrsn)(setq appstr "10.5"));;2016
((vl-string-search "R21.0" vrsn)(setq appstr "11.0"));;2017
((vl-string-search "R22.0" vrsn)(setq appstr "12.0"));;2018
((vl-string-search "R23.0" vrsn)(setq appstr "13.0"));;2019
((vl-string-search "R23.1" vrsn)(setq appstr "13.2"));;2020
((alert "This version of C3D not supported!"))
我还有其他的civ3d资料可以发布;如果您或其他人需要,请提供详细信息。通过工具栏的Smart surface manager。
页:
[1]