Message 1 of 2
please help with creating custom objects/classes

Not applicable
12-11-2001
03:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi.
i am doing some vba development in acad 2000, and ran into some problems creating a desired class, i.e a selectionset object, derived from acdbobject that can contain selection sets. i decided to try creating this using the arx wizard, then loading this into vba. i created a skeletal arx, without modification, then created a (new) dbx within the arx project. there is a dbx dll and arx dll in sepparate debug folders, and i have loaded them 1 by 1 using the appload dialog. i cant get it to work, as the vba is not recognizing the class name when i try to declare /instantiate the object in vba. also, in the class definition as i have it, i could not figure out how to define an AcArray as one of my member objects, as there was no such option in the variable list. below is the outline of the objects (properties and methods) i am trying to create (this is NOT from the arx). please help anyone.
typedef AcArray elements;
class sarsetlist:public acdbobject
{
private:
elements items
public:
char name[100];
sarsetcollection();
~sarsetcollection();
//2 implementations of item for integer and string
acdbentity item(int);
acdbentity item(char*);
virtual int count();
virtual void setname(char*);
virtual void delete(acdbobj);
virtual void remove(acdbobj);
virtual acdbobject additems();
}
class sarsetcollections:public acdbobject
{
private:
elements items
public:
char name[100];
sarsetcollection();
~sarsetcollection();
//2 implementations of item for integer and string
acdbentity item(int);
acdbentity item(char*);
virtual int count();
virtual void setname(char*);
virtual void setname(char[]);
virtual void remove(acdbobj);
}
i am doing some vba development in acad 2000, and ran into some problems creating a desired class, i.e a selectionset object, derived from acdbobject that can contain selection sets. i decided to try creating this using the arx wizard, then loading this into vba. i created a skeletal arx, without modification, then created a (new) dbx within the arx project. there is a dbx dll and arx dll in sepparate debug folders, and i have loaded them 1 by 1 using the appload dialog. i cant get it to work, as the vba is not recognizing the class name when i try to declare /instantiate the object in vba. also, in the class definition as i have it, i could not figure out how to define an AcArray as one of my member objects, as there was no such option in the variable list. below is the outline of the objects (properties and methods) i am trying to create (this is NOT from the arx). please help anyone.
typedef AcArray
class sarsetlist:public acdbobject
{
private:
elements items
public:
char name[100];
sarsetcollection();
~sarsetcollection();
//2 implementations of item for integer and string
acdbentity item(int);
acdbentity item(char*);
virtual int count();
virtual void setname(char*);
virtual void delete(acdbobj);
virtual void remove(acdbobj);
virtual acdbobject additems();
}
class sarsetcollections:public acdbobject
{
private:
elements items
public:
char name[100];
sarsetcollection();
~sarsetcollection();
//2 implementations of item for integer and string
acdbentity item(int);
acdbentity item(char*);
virtual int count();
virtual void setname(char*);
virtual void setname(char[]);
virtual void remove(acdbobj);
}