UnknownUserData

UserData
public class UnknownUserData : UserData
Represents user data with unknown origin.

Constructors

UnknownUserData

#Since v5.0
public UnknownUserData(nint pointerNativeUserData)
Constructs a new unknown data entity.
pointerNativeUserData (nint)A pointer to the entity.

Properties

Description

public virtual string Description { get; }
Descriptive name of the user data.
inherited fromUserData

ShouldWrite

public virtual bool ShouldWrite { get; }
If you want to save this user data in a 3dm file, override ShouldWrite and return true. If you do support serialization, you must also override the Read and Write functions.
inherited fromUserData

Transform

public Transform Transform { get; protected set; }
Updated if user data is attached to a piece of geometry that is transformed and the virtual OnTransform() is not overridden. If you override OnTransform() and want Transform to be updated, then call the base class OnTransform() in your override. The default constructor sets Transform to the identity.
inherited fromUserData

Methods

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromUserData

Dispose

protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

inherited fromUserData
disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

OnDuplicate

protected virtual void OnDuplicate(UserData source)
Is called when the object is being duplicated.
inherited fromUserData
source (UserData)The source data.

OnTransform

protected virtual void OnTransform(Transform transform)
Is called when the object associated with this data is transformed. If you override this function, make sure to call the base class if you want the stored Transform to be updated.
inherited fromUserData
transform (Transform)The transform being applied.

Read

protected virtual bool Read(BinaryArchiveReader archive)
Reads the content of this data from a stream archive.
inherited fromUserData
archive (BinaryArchiveReader)An archive.
true if the data was successfully written. The default implementation always returns false.

Write

protected virtual bool Write(BinaryArchiveWriter archive)
Writes the content of this data to a stream archive.
inherited fromUserData
archive (BinaryArchiveWriter)An archive.
true if the data was successfully written. The default implementation always returns false.