AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eInvalidInput error when trying to AddHole (VB.NET)

1 REPLY 1
Reply
Message 1 of 2
TomiH
603 Views, 1 Reply

eInvalidInput error when trying to AddHole (VB.NET)

Hi,

I'm getting a eInvalidInput exception when I am trying add holes into slabs (VB.NET w/ ADT2007). The ultimate solution would be to convert a Profile into slab, but that gives an exception "NotImplementedYet". Nevertheless, I can create the slab itself from the points found in the Profile (i.e. non-void rings).

For holes I've dried the AddHole method with Point3dCollection, but the result is a eInvalidInput exception. Now I have tried a work-a-round; I am converting the void rings in the profile into polylines and then adding them as holes into the slab. The result is the same exception. See the code below, any ideas what I'm doing wrong in here.


Public Shared Sub AddHoles(ByVal SlabId As ObjectId, ByVal HoleIds As ObjectIdCollection)

Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim lock As DocumentLock = doc.LockDocument
Dim db As Database = doc.Database
Dim tm As DBTransactionManager = db.TransactionManager
Dim trans As Transaction = tm.StartTransaction()

Try
Dim oSlab As Slab = tm.GetObject(SlabId, OpenMode.ForWrite, False, True)

oSlab.AddHole(HoleIds, New Tolerance(0, 0), True)

trans.Commit()
Catch ex As Exception
trans.Abort()
Finally
trans.Dispose()
lock.Dispose()
End Try

End Sub
1 REPLY 1
Message 2 of 2
dwi_it
in reply to: TomiH

I am able to use Solid3d object with the AddHole method. Sometime. Other times it still gives a eInvalidInput, and since there is no documentation to say what the function accepts, I have no clue whats invalid about it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost