AutoCAD Map 3D Developer

Reply
Active Member
kaarigar
Posts: 6
Registered: ‎11-16-2010
Message 1 of 3 (829 Views)

Problem with Query - x64VBAServer has stopped working

829 Views, 2 Replies
08-17-2011 06:54 PM

Environment: AutoCAD Map 3D 2011 + Update 2 , Windows 7 Ultimate 64bit, 64bit VBA

 

The VBA crashes when I attempt the following in order to query from an attached drawing. The error I get is: x64VBAServer has stopped working. The error happens at the code as commented below. Can anyone tell me what should be done to avoid it?

 

Sub DoQuery()
    Dim pMap As AcadMap
    Set pMap = ThisDrawing.Application.GetInterfaceObject("Autocadmap.application")
    
    Dim pProj As Project
    Set pProj = pMap.Projects.Item(0)
    
    'Dim pDrgSet As DrawingSet
    'Set pDrgSet = pProj.DrawingSet
    Dim pAttDwg As AttachedDrawing
    Set pAttDwg = pProj.DrawingSet.Add("C:\\Temp\\Ceometric.dwg")
    
    Dim pQry As Query
    Set pQry = pProj.CurrQuery
    
    pQry.Clear
    
    'Main Query Branch
    Dim pMainQryBranch As QueryBranch
    Set pMainQryBranch = pQry.QueryBranch
    
    'Query Leaf to hold a location query
    Dim pQryLeaf As QueryLeaf
    
    Set pQryLeaf = pMainQryBranch.Add(kAllBoundary, kOperatorAnd) '<<ERROR HAPPENS HERE
    
    'Define the query
    Debug.Print "Query Define: " & pQry.Define(pMainQryBranch)
    
    'Execute the query
    pQry.Execute
        
    
End Sub



Active Member
kaarigar
Posts: 6
Registered: ‎11-16-2010
Message 2 of 3 (814 Views)

Re: Problem with Query - x64VBAServer has stopped working

08-19-2011 05:47 PM in reply to: kaarigar

Anyone, please?

New Member
NwilsonUT
Posts: 1
Registered: ‎04-09-2013
Message 3 of 3 (369 Views)

Re: Problem with Query - x64VBAServer has stopped working

04-09-2013 01:51 PM in reply to: kaarigar

I'm experiencing the exact same thing when I'm trying to assign a queryleaf to the root branch. Anyone know how to fix this? It works fine in AutoCAD Map 2011 32 bit but in AutoCAD Map 2011 64 bit, it does not work.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community