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

0 Members and 1 Guest are viewing this topic.

zombies640

  • Mosquito
  • Posts: 12
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

  • Mosquito
  • Posts: 12
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"