.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A registered application _APP0 was added to preserve orphaned entity xdata.

11 REPLIES 11
Reply
Message 1 of 12
prakashdotc
1137 Views, 11 Replies

A registered application _APP0 was added to preserve orphaned entity xdata.

Hi All,

when i try to drag drop an object which is created through .Net i'm getting this error at command prompt

'A registered application _APP0 was added to preserve orphaned entity xdata.'

any idea to solve this problem, thank's ----------- Prakash.C
11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: prakashdotc

Sounds like you adding XData using an applicationname not registred in the
current dwg.

"Application names are saved with the extended data of each entity that uses
them and in the APPID table. An application must register the name or names
it uses."

/Matt


wrote in message news:5433798@discussion.autodesk.com...
Hi All,

when i try to drag drop an object which is created through .Net i'm
getting this error at command prompt

'A registered application _APP0 was added to preserve orphaned entity
xdata.'

any idea to solve this problem, thank's ----------- Prakash.C
Message 3 of 12
prakashdotc
in reply to: prakashdotc

Hi Matt,

thank's for U'r reply, can i know how register application name in the current dwg, can u explain a little bit brief please,
thank u.

- Prakash.C
Message 4 of 12
Anonymous
in reply to: prakashdotc

In ARX you just call acdbRegApp
I guess there something like it in .NET, could be RegAppAcadName..




wrote in message news:5433827@discussion.autodesk.com...
Hi Matt,

thank's for U'r reply, can i know how register application name in
the current dwg, can u explain a little bit brief please,
thank u.

- Prakash.C
Message 5 of 12
NathTay
in reply to: prakashdotc

See Attached.
Message 6 of 12
NathTay
in reply to: prakashdotc

Might help if I attached it.
Message 7 of 12
prakashdotc
in reply to: prakashdotc

Thank U Matt, Nathan Taylor for U'r reply. I'm working on the solutions which u provided, i'll come back to u if i have any problem in it.

- Prakash.C
Message 8 of 12
Anonymous
in reply to: prakashdotc

> Private Function GetTableRecordId(ByVal objTableId As ObjectId, ByVal strName As String) As ObjectId

If i may suggest, try to avoid coupling your method to the
current working database or active document's database,
whenever the method takes a database-specific object as a
parameter.

IOW, use the Database property of the table ObjectId
passed as the first parameter instead of the current
working database.

Doing makes the method more generic and usable with
any database.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5435500@discussion.autodesk.com...
Might help if I attached it.
Message 9 of 12
NathTay
in reply to: prakashdotc

Thanks Tony.

So
Dim objDB As Database = HostApplicationServices.WorkingDatabase
Should be
Dim objDB As Database = objTableId.Database

That makes good sense.

Regards - Nathan
Message 10 of 12
prakashdotc
in reply to: prakashdotc

Hi Nathan & Tony,

Thank U very much for U'r reply, Actually i'm creating a tool palette with .Net 2005 for AutoCAD 2007, which will be loaded with various images when i drag drop the with doesn't have any text in it there's no problem at all, but when i drag drop a image which has some text i'm getting this error, here's my code where i'm creating MText with style, please review this and give a solution, please.

Autodesk.AutoCAD.DatabaseServices.MText mText = new Autodesk.AutoCAD.DatabaseServices.MText()
{
mText.Contents = text.emrtext.Text;
mText.TextHeight = Math.Abs(font.elfw.elfLogFont.lfHeight);
mText.Color = textColor;

using (AcadDb.TextStyleTableRecord tstR = new Autodesk.AutoCAD.DatabaseServices.TextStyleTableRecord())
{
tstR.Name = "Style" + fileName + instanceIndex + textStyleCount++;

/// -------- Here is where i have inserted U'r code --------- ///
Autodesk.AutoCAD.DatabaseServices.RegAppTable objRAT;
objRAT = ((Autodesk.AutoCAD.DatabaseServices.RegAppTable)trans.GetObject(db.RegAppTableId, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForWrite, false));
Autodesk.AutoCAD.DatabaseServices.RegAppTableRecord objRATR;
Autodesk.AutoCAD.DatabaseServices.ObjectId objRATRID = new Autodesk.AutoCAD.DatabaseServices.ObjectId();
objRATRID = GetTableRecord(db.RegAppTableId, db, trans, tstR.Name);

if (objRATRID == Autodesk.AutoCAD.DatabaseServices.ObjectId.Null)
{
objRATR = new Autodesk.AutoCAD.DatabaseServices.RegAppTableRecord();
objRATR.Name = tstR.Name;
objRAT.Add(objRATR);
trans.AddNewlyCreatedDBObject(objRATR, true);
}

///---------------------------------------------------///
tstR.Font = new Autodesk.AutoCAD.GraphicsInterface.FontDescriptor((font.FaceName.Equals("System")) ? "Arial" : font.FaceName, font.IsBold, font.IsItalic, font.CharSet, font.PitchAndFamily);

tstR.TextSize = Math.Abs(font.elfw.elfLogFont.lfHeight);
AcadDb.TextStyleTable tst = (AcadDb.TextStyleTable)trans.GetObject(db.TextStyleTableId, AcadDb.OpenMode.ForWrite);
mText.TextStyle = tst.Add(tstR);
trans.AddNewlyCreatedDBObject(tstR, true);
}

mText.TextHeight *= 0.65;

// btr is BlockTableRecord

btr.AppendEntity(mText);
trans.AddNewlyCreatedDBObject(mText, true);
}

thank U & bye - Prakash.C
Message 11 of 12
prakashdotc
in reply to: prakashdotc

when i drag drop the image which doesn't have any text there's no problem at all, but when i drag drop a image which has text then i'm getting this error along with the following alert message
Message 12 of 12
prakashdotc
in reply to: prakashdotc

Thank U Nathan,

finally i solved that problem by assigning test style to the contents of the text, thank u for U'r response.

- Prakash.C

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost