UserDictionary

UserData
[Guid("171E831F-7FEF-40E2-9857-E5CCD39446F0")] public class UserDictionary : UserData
Defines the storage data class for a user dictionary.

Properties

Description

#Since v5.0
public override string Description { get; }
Gets the text "RhinoCommon UserDictionary".

Dictionary

#Since v5.0
public ArchivableDictionary Dictionary { get; }
Gets the dictionary that is associated with this class.

This dictionary is unique.

ShouldWrite

#Since v5.0
public override bool ShouldWrite { get; }
Writes this entity if the count is larger than 0.

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 override void OnDuplicate(UserData source)
Clones the user data.
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 override bool Read(BinaryArchiveReader archive)
Is called to read this entity.
archive (BinaryArchiveReader)An archive.
Always returns true.
UserData.Read

Write

#
protected override bool Write(BinaryArchiveWriter archive)
Is called to write this entity.
archive (BinaryArchiveWriter)An archive.
Always returns true.
UserData.Write