@Kevin_Gallagher wrote:
thanks for the quick response.
This is not a code issue. I actually figured it out moments after posting this.
the error was caused by missing entries in the registry.
for this particular code I needed to add HKEY_CLASSES_ROOT\ObjectDBX.AxDbDocument.20 and HKEY_CLASSES_ROOT\ObjectDBX.AxDbDocument.21 to the machines where it did not work.
I am not sure which one is the one that fixed the issue but this is the fix.
Yes, that's why i asked about the AutoCAD versions.
As the number at the end is representing the ACAD version.
The entries are not realy missing. The correct version of ACAD is missing.
(could be your code was written for an older version, but not all machines had this version installed. So, they are 'missing' the registry key's you are trying to use.)
So, technically it IS a 'code' problem, as you need to keep this in mind. (next version your code might be broken again)
If you are actually using a newer version as the registry key's, you are using the registry info from an older installation, not your current one. (with all sorts off potential problems)
You can resolve this by code, using something like:
(strcat "ObjectDBX.AxDbDocument." (substr (getvar 'ACADVER) 1 2))
Instead of hardcoded version numbers.