Object library feature not supported

Object library feature not supported

Anonymous
Not applicable
722 Views
5 Replies
Message 1 of 6

Object library feature not supported

Anonymous
Not applicable
I have recently written a VBA module that runs well in LDDT 2004. The module does not use any of the AECC objects. I am trying to use it on a computer with Civil 3D 2005 installed on it (with LDDT 2004). None of the VBA routines that I tested will run on this machine; I receive the following message: "Object library feature not supported".

I need these routines to work in LDDT 2004 on this machine (removing Civil 3D is not an option), but I do not need them in Civil3D 2005. Is there any way I can make this work?
0 Likes
723 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi,

You will need to create a copy of the file to run in Civil 3D and give it a
different name.
The following file names which have evolved in our office may give you an
idea.

road-Land2003-v6
road-Land2004-v6
road-Land2005-v6
road-Land2005-v6
road-C3D2005-v6
road-C3D2006-v6

This versioning is a nightmare, but every one of the Land versions is
identical but for the libraries and every one of the C3D ones are identical
but for the libraries.

Add that we have several programs for which we have to do this versioning
and you can see what I mean.

--


Laurie Comerford
CADApps
www.cadapps.com.au


wrote in message news:4847943@discussion.autodesk.com...
I have recently written a VBA module that runs well in LDDT 2004. The
module does not use any of the AECC objects. I am trying to use it on a
computer with Civil 3D 2005 installed on it (with LDDT 2004). None of the
VBA routines that I tested will run on this machine; I receive the following
message: "Object library feature not supported".

I need these routines to work in LDDT 2004 on this machine (removing Civil
3D is not an option), but I do not need them in Civil3D 2005. Is there any
way I can make this work?
0 Likes
Message 3 of 6

Anonymous
Not applicable
Laurie,

Thanks for your response. I am afraid the problem might not be as cut and dry as that.

I created a 2005 version of the file, referencing ObjectDBX 16.0 and AutoCAD 2005, and placing that in a seperate file. I reloaded the menus and VBA script and to no avail. The problem did not go away.

I checked the libraries that were referenced and it appears that AutoCAD is loading the AutoCAD 2005 Type Library in LDDT 2004, instead of the AutoCAD 2004 Type Library (as is loaded on the other machines that work properly). All other libraries seem to be loading normally.

The bug is caused by a line similar to the following:

Dim SS As AcadSelectionSet
Set SS = ThisDrawing.SelectionSets.Add("MySelectionSet")

If I remove the "Set SS = ", the code will run, until I attempt to access the selection set, but I do not want to have to rewrite all of my programs to fix this bug.

I am thinking that there is a change in the AutoCAD 2005 Type Library from AutoCAD 2004 with respect to SelectionSets. If there is a quick code fix, I'd like to use it.

If there is a more complex, but viable solution that will allow me to run this program, which works fine on machines without LDDT 2005, in LDDT 2004 on a machine with 2005 installed, I'd like to know how to do it.
0 Likes
Message 4 of 6

Anonymous
Not applicable
Hi,

One thing we have found is that we cannot create an R2004 version of an
R2005 program if both programs are installed.

We maintain a system with only R2004 to create versions which run on R2004 -
In fact we maintain systems with all versions as single installs in order to
change libraries and ensure the program will run on that system.

We have not experienced problems running the programs on systems with
multiple versions installed (My work computer has several version of
Autodesk software installed and experiences no problems running programs)

--


Laurie Comerford
CADApps
www.cadapps.com.au

wrote in message news:4848170@discussion.autodesk.com...
Laurie,

Thanks for your response. I am afraid the problem might not be as cut and
dry as that.

I created a 2005 version of the file, referencing ObjectDBX 16.0 and AutoCAD
2005, and placing that in a seperate file. I reloaded the menus and VBA
script and to no avail. The problem did not go away.

I checked the libraries that were referenced and it appears that AutoCAD is
loading the AutoCAD 2005 Type Library in LDDT 2004, instead of the AutoCAD
2004 Type Library (as is loaded on the other machines that work properly).
All other libraries seem to be loading normally.

The bug is caused by a line similar to the following:

Dim SS As AcadSelectionSet
Set SS = ThisDrawing.SelectionSets.Add("MySelectionSet")

If I remove the "Set SS = ", the code will run, until I attempt to access
the selection set, but I do not want to have to rewrite all of my programs
to fix this bug.

I am thinking that there is a change in the AutoCAD 2005 Type Library from
AutoCAD 2004 with respect to SelectionSets. If there is a quick code fix,
I'd like to use it.

If there is a more complex, but viable solution that will allow me to run
this program, which works fine on machines without LDDT 2005, in LDDT 2004
on a machine with 2005 installed, I'd like to know how to do it.
0 Likes
Message 5 of 6

Anonymous
Not applicable
This problem is related to 'dvb bloat' (search this ng for more info). Since
a dvb is comprised of your 'text' code and also compiled machine code, you
can't expect the same dvb to run on both versions. When you load it into a
higher version app, it will get compiled for that app and then it will no
longer run on the lower version app. You can use the same code, but create 2
dvb's from it and store the higher version in another folder. If you no
longer have a 2004 compiled version, i.e. you loaded it into 2005 without
backing it up, then open the dvb in 2005 and export the modules. Then
reassemble them in 2004.

--
----
Ed
----
0 Likes
Message 6 of 6

Anonymous
Not applicable
Since I discovered an easy solution to this problem, or rather, a simpler problem to solve, I'll post it here in case anyone else has the same problem.

The "Object library feature not supported" error was caused by something that appears to be a change to the object model from 2004 to 2005. I used the following to create a selection set:

Set SS = ThisDrawing.SelectionSets.Add("SSNAME")

and had to replace it with:

ThisDrawing.SelectionSets.Add("SSNAME")
Set SS = ThisDrawing.SelectionSets.Item("SSNAME")

I had to do this throughout the application, but it seems to work in 2004 and 2005 equally well, now.

Is there somewhere that I can get a summary of such changes?
0 Likes