高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】shape Class Was Not Registered
shape class was not registered
shape class was not registered
when accessing shape entity in dwgdirect. an error message said "class not registered". am i missing a dll or do i forget register a dll???
other entities can be accessed, such as arc, circle, line....
how you access the shape entity? from c++, from vb? using which function?
a few lines of code would be helpfull.
sergey slezkin
i am using c#...
here is the code,
iacadmodelspace ms = db.modelspace;
foreach(iacadentity entity in ms)
........
the ms.count is correct on the number of entities it contains. but
it throws an exception when it actually loops to the shape entity.
maybe this can help....
i downloaded the dwgdirectx1.08, unzip and run setup....
from vs.net command prompt, i used the "tlbimp" command to generate an assembly from dwgdirectx.dll......on the command line, i enter "tlbimp dwgdirectx.dll /out:axlib.dll"....
create a c# project, goto rreferences in solution explorer then add the axlib.dll.
inside the code:
odahost = new odahostapp();
adoc = odahost.application.documents.open("dwg file", true);
iacadmodelspace ms = adoc.database.modelspace;
foreach(iacadentity ent in ms)
{
processing entity..........
}
when encounter a shape entity, an exception is throwed....
the message is "class not registered!"
hi,
thanks, it helped.
it's a common dwgdirectx bug. now it's fixed.
thanks....
are you going to add the access methods for symbol id and shx-file name to the shape interface???
|