DxfCode.ArbitraryHandle vs DxfCode.Handle

DxfCode.ArbitraryHandle vs DxfCode.Handle

kazfukuoka
Enthusiast Enthusiast
429 Views
4 Replies
Message 1 of 5

DxfCode.ArbitraryHandle vs DxfCode.Handle

kazfukuoka
Enthusiast
Enthusiast

Hi Community,

For Xrecord, what is the difference between
DxfCode.ArbitraryHandle and DxfCode.Handle?

For storing a Handle, which type is right?

 

  var rb = new ResultBuffer(
    new TypedValue((int)DxfCode.ArbitraryHandle, id.Handle);
    new TypedValue((int)DxfCode.Handle, id.Handle);
  Xrecord xrec = new Xrecord();
  xrec.Data = rb;
  xdic.SetAt(APP, xrec);
  tr.AddNewlyCreatedDBObject(xrec, true);

 

Also for storing ObjectId, which type should I use?
DxfCode.HardPointerId or DxfCode.SoftPointerId?

0 Likes
Accepted solutions (1)
430 Views
4 Replies
Replies (4)
Message 2 of 5

ActivistInvestor
Mentor
Mentor
Accepted solution

@kazfukuoka wrote:

Hi Community,

For Xrecord, what is the difference between
DxfCode.ArbitraryHandle and DxfCode.Handle?

For storing a Handle, which type is right?

 

Also for storing ObjectId, which type should I use?
DxfCode.HardPointerId or DxfCode.SoftPointerId?


I wouldn't recommend storing handles in Xrecords, but ArbitraryHandle is probably a handle that is never translated when the object containing the Xrecord is cloned (this is speculation as I've never seen docs that describe what it is exactly).

 

As far as what DxfCode you should use to store ObjectIds (which is the preferred way to store references to other objects), it depends on what objects are being referenced and the relationship they have with the object that owns the referencing Xrecord.

 

Feel free to elaborate.

0 Likes
Message 3 of 5

kazfukuoka
Enthusiast
Enthusiast

Thank you for the explanation. 

There seems to be a lot of things I do not know about this topic.
Where can I study those things?

0 Likes
Message 4 of 5

kazfukuoka
Enthusiast
Enthusiast

Probably not much has been written for .NET yet.
Need to dig into ObjectARX to find any info.

 

AcDbHardPointerId 

AcDbSoftPointerId 

0 Likes
Message 5 of 5

ActivistInvestor
Mentor
Mentor

Sorry, I tried to reply to your previous post but I couldn't because of a problem with this discussion group software. Yes, the native ObjectARX docs are the most complete source of information on this.