TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Anonymous on December 22, 2003, 09:13:56 AM

Title: ActiveX Server returned an error
Post by: Anonymous on December 22, 2003, 09:13:56 AM
Hi,
As anyone of the many genius's out there explain the following:

Command: kitoX-dimtools-scale
Select dimension :; error: ActiveX Server returned an error: Error loading type
library/DLL

This not the only code that produces the same error, I suspect that some component was not loaded when Autocad was installed.
I'm running A2002 by the way. I'm sure that th solution is very simple.
Derek
Title: ActiveX Server returned an error
Post by: Mark on December 22, 2003, 09:34:17 AM
Just for the heck of it try typing in this before you run the command.
(vl-load-com)
Title: ActiveX Server returned an error
Post by: dellboy on December 22, 2003, 09:51:01 AM
Quote from: Mark Thomas
Just for the heck of it try typing in this before you run the command.
(vl-load-com)

Mike,
Tried that but with no success.
Derek
Title: ActiveX Server returned an error
Post by: Mark on December 22, 2003, 09:58:44 AM
I would try contacting the author of the software. He can probably fix it, or tell you how real quick.
vg_AT_kitox.com
Title: ActiveX Server returned an error
Post by: dellboy on December 22, 2003, 10:46:33 AM
Mike,
I've already contacted him and he's as lost as me.
The puzzle is it only happens to some of the routines, the others work fine. The same problem occurs in say Express Tools, one or two commands don't work the rest do, snd of ccourse Sods Law says thet the one you want to use won't.
Derek
Title: ActiveX Server returned an error
Post by: daron on December 22, 2003, 11:36:35 AM
Well, first of all lisp is having trouble loading a typelibrary and a certain dll file. Do you have the source code or is it all compiled? If you have it, can you post it, so we could at least have some idea of what types are being called? If it is only calling the ActiveX model, there might be a problem with your installation. Try repairing the acad install through add/remove programs.
Title: ActiveX Server returned an error
Post by: Keith™ on December 22, 2003, 01:42:30 PM
The VLisp extensions require the loading of the type libraries for VBA. If you do not have the VBA option installed, you will not be able to use VLisp unless you specifically extract the type library to the support path.
Another reason could be that there are too many support paths listed in the support search folder, and those required to operate AutoCAD cannot exceed the maximum string length for a registry entry, otherwise the operating system will truncate the entry.
I have seen that where the files were indeed installed, but because the user added so many paths to the support search AutoCAD could not find critical files. It is a limitation with the registry and should not be viewed as an AutoCAD bug.

See this link (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2884947&linkID=2475323) for more detail.
Title: ActiveX Server returned an error
Post by: Craig on December 22, 2003, 01:51:06 PM
:o  Mike???  :lol:
Title: ActiveX Server returned an error
Post by: daron on December 22, 2003, 03:35:03 PM
I think he means Mark.
Title: ActiveX Server returned an error
Post by: Craig on December 22, 2003, 04:52:29 PM
Oh, I know. It's the holidays and I'm in a festive *drunk* mood. I was just having fun with Derek. You know how it is when you're at a party or a gathering and you  introduce yourself to someone and they continue to call you the wrong name the entire party. I find it really funny.  :lol:  :lol:  :lol:

hmmmm...not that I've ever done that  :oops:
Title: Attechements
Post by: dellboy on December 30, 2003, 06:02:48 AM
Happy New Year everyone.
Well I've got the code, if only I could send it someone. How do I send it, can't find a way to attach the file.
One interesting avenue is the support file refs, I do have one or two, I will look at reducing them.

Derek
Title: ActiveX Server returned an error
Post by: Keith™ on December 30, 2003, 07:32:33 AM
Derek, you can upload the code in the lilly pond. To do this go here (http://theswamp.org/lilly.pond) and create a "dellboy" folder, then upload the file to your folder, then we can all get to it to help you diagnose the problem.
Title: ActiveX Server returned an error
Post by: SMadsen on December 30, 2003, 07:38:48 AM
If you have the source code, and assuming it is AutoLISP code, there is perhaps a quicker way to get to know more about the error.
If you are not familiar with the VLIDE then don't worry. Just follow the steps below. If you don't have the source code and/or it is not AutoLISP code, then disregard the following.

1. Type VLIDE at the command line. This will bring up the Visual LISP editor.
2. Go to the Debug menu and see if the item "Break On Error" is checked. If not, select it to check it.
3. Leave the Visual LISP editor open and switch to AutoCAD.
4. Call the offending command.
5. On error, switch to the VLIDE editor.
6. In the editor, go to the Debug menu and choose "Last Break Source", or hit Ctrl-F9. This should bring up the code and locate the error within the code.
7. If no. 6 succeeded, copy the offending code to the forum and we'll take a look at it.
8. If no go at no. 6, we'll need more to go with.
Title: Lily pond
Post by: dellboy on December 31, 2003, 07:43:19 AM
I've looked round and can't find the Lily Pond. How do I get there from the forums.
Derek
Title: ActiveX Server returned an error
Post by: Keith™ on December 31, 2003, 07:50:20 AM
Click on the link in my previous post or click here (http://theswamp.org/lilly.pond)
Title: Lily Pond
Post by: dellboy on December 31, 2003, 09:00:22 AM
Mark,
Found it thank you, I've uploaded the files(apart from thebmps). Is there of getting to the Lily pond without using your link :?
Derek
Title: ActiveX Server returned an error
Post by: daron on December 31, 2003, 09:30:49 AM
You could take note of the address when you're in there and bookmark it.
Title: ActiveX Server returned an error
Post by: Keith™ on December 31, 2003, 10:02:48 AM
Ok I have sucessfully executed the commands with no adverse effects. I would suspect you do not have all of the VBA type libraries installed. Since the code is a compiled VLX we cannot look at it to determine the reason it won't work, we can only speculate. Since some Express tools also don't work, I think that if you reinstalled the VBA components it should fix the problem. What you need to realize is that the module likely uses ActiveX VisualLisp commands that require the VBA Type libraries. If you are missing a specific one, then the commands that require that library will not work.
Title: ActiveX Server returned an error
Post by: deegeecees on December 31, 2003, 10:33:47 AM
This is going to be a hit/miss for my suggestion.

Try going to Tools>Macro>Visual Basic Editor and see if there is a reference to the application you are having the problem with i.e. (in VBAIDE) Tools>References, scroll down until you see something that has the same name, or make sure that AutoCAD type library is loaded.

Like I said, hit or miss...
Title: ActiveX Server returned an error
Post by: daron on December 31, 2003, 11:41:30 AM
So, you are both saying that even though it's a lisp (vlx) file, you can set the references in vba and retrieve them in lisp?
Title: ActiveX Server returned an error
Post by: deegeecees on December 31, 2003, 12:10:03 PM
I guess thats what I'm saying. It's either that or you need to load the DLL externally. I used to know how to do that. Let me investigate more into this as I have ample free time.
Title: ActiveX Server returned an error
Post by: Keith™ on December 31, 2003, 12:56:41 PM
What I am saying is that the ActiveX components in lisp aka VisualLisp uses the exact same type libraries as VBA, so if you don't have all of the AutoCAD VBA type libraries VisualLisp will not function properly.
Title: ActiveX Server returned an error
Post by: daron on December 31, 2003, 02:23:37 PM
I think that's what I wanted to hear. Cool!