VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Invalid Callee" Automation Error

5 REPLIES 5
Reply
Message 1 of 6
lgordon
2213 Views, 5 Replies

"Invalid Callee" Automation Error

I created and then solved (fortunately) this error today -- "Automation error -- invalid callee". These relatively arcane M'soft errors are not always so easy to troubleshoot.

The routine was a simple xdata check function:
-------------------
Private Function IsTagged(Obj) As Boolean
dim XDObj as Variant
dim XDTypeObj as Integer
On Error Resume Next
Obj.GetXData "MyApp", XDTypeObj, XDObj
If IsEmpty(XDObj) Then
IsTagged=False
Else
IsTagged=True
End Function
---------------
Do you see the error? I neglected to specify the parameter Obj "as AcadObject" or some other more specific object type.

Maybe this'll save somebody some time.

Lance
5 REPLIES 5
Message 2 of 6
timsparks6941
in reply to: lgordon

Lance,

Since you seem to know this stuff...can I ask you some questions?

Where can I find the library of objects?
I'm trying to find out what Get_Limits returns.

Can you point me to a glossary or library?
Is it in the help file?

Thanks,
Tim
Message 3 of 6
lgordon
in reply to: lgordon

>> Where can I find the library of objects?

Tim, you can find the "library of objects" right in the VBA IDE (editor) by pushing the F@ button. This shows the Object Browser, which contains all the "legal" AutoCAD objects.

>> I'm trying to find out what Get_Limits returns.

If what you mean by "Get_Limits" is the Limits property of ThisDrawing (the current drawing), the fastest way is to go to the Immediate window and try typing "? ThisDrawing.Limits". Since this is not a valid statement, you'll see an error message, BUT then try highlighting the word "Limits" with the mouse and push the F1 key. This will send you right to the help on the Limits property, and even displays an example of how to use the property in code.

This ought to get you started.
Lance
Message 4 of 6
timsparks6941
in reply to: lgordon

Thanks for the reply...

What I meant to ask for is the AutoCadOLE Automation obj that is named Get_Limits. It shows that it resolves to an OLEVariant 'data type'(?).

We were wondering what type of obj is returned.

I'm sure I'm asking this the right way, but hopefully you understand..

Tim
Message 5 of 6
lgordon
in reply to: lgordon

Sorry, Tim, I don't know where to find any documentation on "Get_Limits". Where did you encounter it? It sounds as if "Get_Limits" is itself a subroutine that returns a variant, but without seeing what it is, I'm totally guessing here. Is it an ObjectARX function/subroutine? Sorry. Wish I could help.
Message 6 of 6
timsparks6941
in reply to: lgordon

I guess I assumed that it was an obj in AutoCad OLE Automation.

It's tough not know what I'm talking about...never mind then....just repeating what I am being told.

This is coming up in a delphi program, but I thought that it was calling an object in the Acad DB.

Sorry for the trouble...

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

Post to forums  

Autodesk Design & Make Report

”Boost