hi
i want to store long , Matrix3d and SubentityId to xdata, but it seems these types are not supported i managed to store long and SubentityId as Handle but i failed to store Matrix3d?
any idea!!
here is what xdata support
ExtendedDataAsciiString = 1000,
ExtendedDataBinaryChunk = 1004,
ExtendedDataControlString = 1002,
ExtendedDataDist = 1041,
ExtendedDataHandle = 1005,
ExtendedDataInteger16 = 1070,
ExtendedDataInteger32 = 1071,
ExtendedDataLayerName = 1003,
ExtendedDataReal = 1040,
ExtendedDataRegAppName = 1001,
ExtendedDataScale = 1042,
ExtendedDataWorldXCoordinate = 1011,
ExtendedDataWorldXDir = 1013,
ExtendedDataWorldXDisp = 1012,
ExtendedDataWorldYCoordinate = 1021,
ExtendedDataWorldYDir = 0x3FF,
ExtendedDataWorldYDisp = 1022,
ExtendedDataWorldZCoordinate = 1031,
ExtendedDataWorldZDir = 1033,
ExtendedDataWorldZDisp = 1032,
ExtendedDataXCoordinate = 1010,
ExtendedDataYCoordinate = 1020,
ExtendedDataZCoordinate = 1030,
1. SubentityId can not been saved as Handle
2. Matrix3d can be saved as 16 (4 * 4) doubles (for example, in group ExtendedDataReal)
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"
Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
thanks for repy.
@Alexander.Rivilis wrote:1. SubentityId can not been saved as Handle
i wrote two methods, but havn't tested yes.
public static _AcDb.Handle ToHandle(_AcDb.SubentityId seid)
{
return new _AcDb.Handle(seid.IndexPtr.ToInt64());
}
public static _AcDb.SubentityId ToSubentityId(_AcDb.SubentityType type,long value)
{
return new _AcDb.SubentityId(type, new IntPtr(value));
}
Hi,
To store a Matrix3d in Xdata, you can store it as a coordinate system: origin (1010), X axis (1013), Y axis (1023) and Z axis (1033).
You could also use Xrecords in the Extension Dictionary of the object. DBDictionaries are more flexible than Xdata and can store ObjectIds as Hard/Soft pointers or owners.
Aren’t some of these values transformed along with the entity? In that case it would be different behavior than Xrecords
@essam-salah a écrit :
how to convert from Matrix3d to CoordinateSystem3d and vice-versa?
Thanks in advance
The developper's documentation is your friend (as the Visual Studio Object Explorer).
The Matrix3d structure provides a CoordinateSystem3d property and an AlignCoordinateSystem method.
Can't find what you're looking for? Ask the community or share your knowledge.