本文整理汇总了C#中Rhino.WriteGuid方法的典型用法代码示例。如果您正苦于以下问题:C# Rhino.WriteGuid方法的具体用法?C# Rhino.WriteGuid怎么用?C# Rhino.WriteGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rhino
的用法示例。
在下文中一共展示了Rhino.WriteGuid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteDocument
//If any ON_BinaryArchive::Write*() functions return false than you should
//immediately return false otherwise return true if all data was written
//successfully. Returning false will cause Rhino to stop writing this document.
protected override void WriteDocument(Rhino.RhinoDoc doc, Rhino.FileIO.BinaryArchiveWriter archive, Rhino.FileIO.FileWriteOptions options)
{
//This function is called because ShouldCallWriteDocument returned True.
//Write your plug-in data to the document
string date_string = System.DateTime.Now.ToShortDateString();
string time_string = System.DateTime.Now.ToShortTimeString();
//It is a good idea to always start with a version number
//so you can modify your document read/write code in the future
archive.Write3dmChunkVersion(1, 0);
archive.WriteString(date_string);
archive.WriteString(time_string);
UI.Pach_Source_Object S_command = Pach_Source_Object.Instance;
UI.Pach_Receiver_Object R_command = Pach_Receiver_Object.Instance;
foreach (System.Guid ID in SourceConduit.Instance.UUID)
{
System.Guid N_ID = new System.Guid(ID.ToString());
archive.WriteGuid(N_ID);
archive.WriteString("Source");
}
foreach (System.Guid ID in ReceiverConduit.Instance.UUID)
{
System.Guid N_ID = new System.Guid(ID.ToString());
archive.WriteGuid(N_ID);
archive.WriteString("Receiver");
}
}