AeccPipe/Structure 是否总是返回 false
有人知道为什么“Is AECCIPE”和“Is AeccStructure”不断返回false吗?昨晚使用了相同的代码,但自从我的CAD崩溃后,相同的代码就无法识别我绘制的管道实际上是一个管道,我不明白为什么…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
**** Hidden Message ***** 作为测试,我在ThisDrawing下面添加了这条线。获取实体...
Msgbox spsAcadObj.ObjectName
并且确实返回了“AeccDBPipe” 有没有人解决这个问题? 我在vba中有一个管网实用程序,就像AutoCAD工作了几年一样。 现在,在2020年搬到一家新公司后,它还没有成功。 此外,在安装2020 Service Pack 2之后,它甚至不会通过AeccXUiPipe.AeccPipeApplication.13.2的分配。 本周早些时候,我可以让它通过这个并走过绘图中的对象,但是 object.name 是AeccDbPipe,不会在AeccPipe上打字吗?
Dim oApp As AcadApplication
Set oApp = ThisDrawing.Application
Dim sAppName As String
sAppName = “AeccXUiPipe.AeccPipeApplication.13.2”
Dim oPipeApplication As AeccPipeApplication
Set oPipeApplication = oApp.GetInterfaceObject(sAppName)
' 获取对当前活动文档的引用。
Dim oPipeDocument As AeccPipeDocument
Set oPipeDocument = oPipeApplication.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的东西可以发布细节,如果你或任何其他人想要。通过工具栏实现智能曲面管理器。
页:
[1]