Author Topic: Is AeccPipe/Structure always returning false  (Read 7769 times)

0 Members and 1 Guest are viewing this topic.

zombies640

  • Guest
Is AeccPipe/Structure always returning false
« on: June 11, 2017, 06:48:42 PM »
Does anyone know why "Is AeccPipe" and "Is AeccStructure" keeps returning false? The same code worked last night, but ever since my CAD crashed, this same code isn't recognizing the pipe I drew is actually a pipe and I can't figure out why...
Code: [Select]
   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
« Last Edit: June 11, 2017, 06:53:49 PM by zombies640 »

zombies640

  • Guest
Re: Is AeccPipe/Structure always returning false
« Reply #1 on: June 11, 2017, 07:05:02 PM »
As a test, I added this line below the ThisDrawing.GetEntity...
Code: [Select]
Msgbox spsAcadObj.ObjectName
And that indeed returned "AeccDBPipe"

jcklinke

  • Mosquito
  • Posts: 1
Re: Is AeccPipe/Structure always returning false
« Reply #2 on: November 07, 2019, 03:26:44 PM »
Has anyone solved this issue?  I have had a pipe network utility in vba that as worked for several years of AutoCAD.  Now, after moving to a new company with 2020 it has not worked.  Also,, after installing the 2020 service pack 2, it will not even make it past the assignment of AeccXUiPipe.AeccPipeApplication.13.2.  Earlier this week i could get it past this and walk thru the objects in the drawing, but the object.name was AeccDbPipe and would not type out at an 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)
 
' Get a reference to the currently active document.
Dim oPipeDocument As AeccPipeDocument
Set oPipeDocument = oPipeApplication.ActiveDocument
   

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: Is AeccPipe/Structure always returning false
« Reply #3 on: November 07, 2019, 06:39:01 PM »
Not the answer to your question but a generic there are two ways of finding the version number of CIV3d either through version or via registery just some one else may want to use and has non 2020

Code: [Select]
((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!"))

I have other civ3d stuff can post  details if you or anyone else wants. Smart surface manager via toolbar.
A man who never made a mistake never made anything