How to use HistroyRecord Class?

I am trying to execute HistoryRecord

public HistoryRecord(
	Command command,
	int version
)

I wanted to know what command does it need and what does the version stand for.
I was looking at the Rhinocommon API but it does not explain what these inputs mean and how to provide them.
Any leads or an example will help a lot.
Thanks

1 Like

@Mahdiyar , Thank you , this was a good reference and it helped me understand the use of historyrecord. It seems that we need to have a command from rhino to make use of it even from Grasshopper.

@bobmcneel & @dale , I have been trying to implement a custom Ordinate Dimension class and currently function to AddOrdinateDimension to Rhino is based on this function

public Guid AddOrdinateDimension(
	OrdinateDimension dimordinate,
	ObjectAttributes attributes,
	HistoryRecord history,
	bool reference
)

Can we not have it like other Dimension classes, where we only need

public Guid AddOrdinateDimension(
	OrdinateDimension dimordinate,
	ObjectAttributes attributes)

How about just doing this?

var dim_id = doc.Objects.AddAngularDimension(dimension, attributes, null, false);

– Dale

Hi @dale ,
Thank you , that worked.