コード例 #1
0
        private StepDataObject ExtractFileName(iso_10303 iso10303)
        {
            if (iso10303 == null)
            {
                throw new ArgumentNullException("iso10303");
            }
            iso_10303_28_header header = iso10303.iso_10303_28_header;

            if (header == null)
            {
                throw new ArgumentNullException("iso10303.iso_10303_28_header");
            }
            StepDataObject sdo = new StepDataObject();

            sdo.ObjectName = "FILE_NAME";

            sdo.Properties.Add(StepValue.CreateString(header.name));
            sdo.Properties.Add(StepValue.CreateDate(header.time_stamp));

            sdo.Properties.Add(StepValue.CreateArray(StepValue.CreateString(header.author)));

            //FIXME header.organization is a string and not a list, but the Step file expects an array
            sdo.Properties.Add(StepValue.CreateArray(StepValue.CreateString(header.organization)));

            sdo.Properties.Add(StepValue.CreateString(header.preprocessor_version));
            sdo.Properties.Add(StepValue.CreateString(header.originating_system));
            sdo.Properties.Add(StepValue.CreateString(header.authorization));
            return(sdo);
        }
コード例 #2
0
ファイル: ExampleData.cs プロジェクト: whztt07/ifc-dotnet
        private static IList <StepDataObject> createHeader()
        {
            IList <StepDataObject> headerLines = new List <StepDataObject>(3);

            headerLines.Add(new StepDataObject("FILE_DESCRIPTION",
                                               StepValue.CreateArray(
                                                   StepValue.CreateString("ViewDefinition [CoordinationView, QuantityTakeOffAddOnView]")
                                                   ),
                                               StepValue.CreateString("2;1")
                                               ));
            headerLines.Add(new StepDataObject("FILE_NAME",
                                               StepValue.CreateString("example.ifc"),
                                               StepValue.CreateDate("2008-08-01T21:53:56"),
                                               StepValue.CreateArray(
                                                   StepValue.CreateString("Architect")
                                                   )
                                               ));
            headerLines.Add(new StepDataObject("FILE_SCHEMA",
                                               StepValue.CreateArray(
                                                   StepValue.CreateString("IFC2X3")
                                                   )
                                               ));
            return(headerLines);
        }