Which lib is AcGiVisualStyleTraits in?

Which lib is AcGiVisualStyleTraits in?

Anonymous
Not applicable
484 Views
4 Replies
Message 1 of 5

Which lib is AcGiVisualStyleTraits in?

Anonymous
Not applicable
...so I've been monkeying around with AcGiSubEntityTraits and AcGiDrawableTraits and have discovered that the objects pointed to in AcDbEntity::setAttributes and AcDbEntity::worldDraw are derived from those classes as pTraits->isA confirms, but I've not been able to match the pTraits->isA() call to an AcRxClass::desc() yet and I'm thinking maybe it's because it's an object of class AcGiVisualStyleTraits? Unfortunately I can't test the theory yet because I can't figure out which library the implementation for AcGiVisualStyleTraits::desc() is in. You'd think it'd be in the acgiapi.lib, but, no, it's not there. I haven't tried them all yet but I'd sure like to know where it is or if it's possible to link an ARX calling AcGiVisualStyleTraits::desc() without knowing which library it's in.

f.y.i I'm using ARX 2007 a.t.m.

Regards,
Andy F.
0 Likes
485 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
The AcGiVisualStyleTraits class is in acdb17.dll, but
AcGiVisualStyleTraits::desc() is not exported. Only
AcGiVisualStyleTraits::isA() is exported.

The actual class of the object involved in the methods you are talking about
will vary depending on the situation. For example, the object involved when
proxy graphics are being obtained will be different than the one when a
regular graphics generation is being done. And, the one used when shademode
is 2d will be different than the one used when shademode is a different
value.

wrote in message news:[email protected]...
...so I've been monkeying around with AcGiSubEntityTraits and
AcGiDrawableTraits and have discovered that the objects pointed to in
AcDbEntity::setAttributes and AcDbEntity::worldDraw are derived from those
classes as pTraits->isA confirms, but I've not been able to match the
pTraits->isA() call to an AcRxClass::desc() yet and I'm thinking maybe it's
because it's an object of class AcGiVisualStyleTraits? Unfortunately I
can't test the theory yet because I can't figure out which library the
implementation for AcGiVisualStyleTraits::desc() is in. You'd think it'd be
in the acgiapi.lib, but, no, it's not there. I haven't tried them all yet
but I'd sure like to know where it is or if it's possible to link an ARX
calling AcGiVisualStyleTraits::desc() without knowing which library it's in.

f.y.i I'm using ARX 2007 a.t.m.

Regards,
Andy F.
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thank you for the reply Art,

Knowing that desc() is unavailable now, do I need to instantiate my own AcGiVisualTraits object to be able to compare it to the traits objects passed into the relevant overrides?



AcGiVisualTraits* pVisTraits = NULL;
pVisTraits = new AcGiVisualTraits;

if (pVisTraits)
{
...

// assume "pTraits" points to a previously obtained
// AcGiDrawableTraits or AcGiSubEntityTraits object.

if (pTraits->isKindOf() == pVisTraits->isA())
{
...
}

delete pVisTraits;
pVisTraits = NULL;
}



Are there undocumented classes derived from AcGiVisualStyleTraits that override isA()?
0 Likes
Message 4 of 5

Anonymous
Not applicable
There is no AcGiVisualTraits class. If you mean the AcGiVisualStyleTraits
class, then no because you can't instantiate an object of that class since
it's an abstract base class that has pure virtual functions.

Perhaps if you explain why you are trying to do all of this, we can try to
help you come up with some other way to do what you need.

wrote in message news:[email protected]...
Thank you for the reply Art,

Knowing that desc() is unavailable now, do I need to instantiate my own
AcGiVisualTraits object to be able to compare it to the traits objects
passed into the relevant overrides?



AcGiVisualTraits* pVisTraits = NULL;
pVisTraits = new AcGiVisualTraits;

if (pVisTraits)
{
...

// assume "pTraits" points to a previously obtained
// AcGiDrawableTraits or AcGiSubEntityTraits object.

if (pTraits->isKindOf() == pVisTraits->isA())
{
...
}

delete pVisTraits;
pVisTraits = NULL;
}



Are there undocumented classes derived from AcGiVisualStyleTraits that
override isA()?
0 Likes
Message 5 of 5

Anonymous
Not applicable
Andy:

You can get any instantiated AcRxClass object by looking it up in the
class dictionary by name, but I suspect that you're trying to solve the
wrong problem. Perhaps if you explain the real problem, someone can suggest
a different approach.


> Are there undocumented classes derived from
> AcGiVisualStyleTraits that override isA()?

Not necessarily undocumented, but it's certainly possible for third party
applications to pass in their own derived classes. 🙂
--
Owen Wengerd
President, ManuSoft <>
VP Americas, CADLock, Inc. <>
0 Likes