当前位置: 首页>>代码示例>>C#>>正文


C# Rhino.WriteString方法代码示例

本文整理汇总了C#中Rhino.WriteString方法的典型用法代码示例。如果您正苦于以下问题:C# Rhino.WriteString方法的具体用法?C# Rhino.WriteString怎么用?C# Rhino.WriteString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rhino的用法示例。


在下文中一共展示了Rhino.WriteString方法的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");
                }
            }
开发者ID:MengdiGuo,项目名称:PachydermAcoustic_Rhinoceros,代码行数:34,代码来源:Pachyderm_AcousticPlugIn.cs


注:本文中的Rhino.WriteString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。