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

Replace Xtended Entity data!

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
234 Views, 3 Replies

Replace Xtended Entity data!

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.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

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.
Message 3 of 4
night_kinghd
in reply to: Anonymous

how do you remove XData of object?
Message 4 of 4
Anonymous
in reply to: Anonymous

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

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