.NET

Reply
*Jay Balapa
Message 1 of 4 (105 Views)

Replace Xtended Entity data!

105 Views, 3 Replies
05-17-2006 06:47 AM
Hello,

We are moving towards a new version of our software and we are researching
whether we can replace XDATA with something more more extensive. Currently
we have some size limitations with xdata.
thanks.

jay.
*jwj
Message 2 of 4 (105 Views)

Re: Replace Xtended Entity data!

05-18-2006 11:16 AM in reply to: *Jay Balapa
You might want to look at extension dictionaries.

John

"Jay Balapa" wrote in message
news:5177317@discussion.autodesk.com...
Hello,

We are moving towards a new version of our software and we are researching
whether we can replace XDATA with something more more extensive. Currently
we have some size limitations with xdata.
thanks.

jay.
Member
night_kinghd
Posts: 4
Registered: ‎05-16-2006
Message 3 of 4 (105 Views)

Re: Replace Xtended Entity data!

05-22-2006 03:23 AM in reply to: *Jay Balapa
how do you remove XData of object?
Distinguished Contributor
RolandF
Posts: 172
Registered: ‎11-19-2003
Message 4 of 4 (105 Views)

Re: Replace Xtended Entity data!

05-22-2006 04:46 AM in reply to: *Jay Balapa
Do you mean something like this?

public static void RSNNSSDelXdataAll()

{

Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;

Database db = HostApplicationServices.WorkingDatabase;

Transaction myT = db.TransactionManager.StartTransaction();

try

{

string AppName = "RSNN_Selection";

TypedValue[] filList = new TypedValue[1];

//Build a filter list so that only block references are selected

filList[0] = new TypedValue((int)DxfCode.ExtendedDataRegAppName, AppName);

SelectionFilter filter = new SelectionFilter(filList);

//user selection will pick only Appname ents

PromptSelectionResult res = ed.SelectAll(filter); //all ents with Appname

//Do nothing if selection is unsuccessful

if (res.Status != PromptStatus.OK)

return;

Autodesk.AutoCAD.EditorInput.SelectionSet SS = res.Value;

ObjectId[] idArray;

idArray = SS.GetObjectIds();

ResultBuffer buf = new ResultBuffer();

buf.Add(new TypedValue((int)DxfCode.ExtendedDataRegAppName, AppName));

//collect all employee details in saEmployeeList array

foreach (ObjectId objId in idArray)

{

Entity tmpEnt = (Entity)myT.GetObject(objId, OpenMode.ForWrite);

if (tmpEnt != null)

tmpEnt.XData = buf;

}

myT.Commit();

}

catch (System.Exception)

{

myT.Commit();

throw;

}

finally

{

myT.Dispose();

}

}


--
Roland Feletic
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.