Example #1
0
        internal string getHeaderString(string fileName)
        {
            string hdr = "ISO-10303-21;\r\nHEADER;\r\nFILE_DESCRIPTION(('ViewDefinition [" + viewDefinition + "]'),'2;1');\r\n";

            hdr += "FILE_NAME(\r\n";
            hdr += "/* name */ '" + ParserIfc.ReplaceAe(ParserIfc.Encode(Path.GetFileName(fileName))) + "',\r\n";
            DateTime now = DateTime.Now;

            hdr += "/* time_stamp */ '" + now.Year + "-" + (now.Month < 10 ? "0" : "") + now.Month + "-" + (now.Day < 10 ? "0" : "") + now.Day + "T" + (now.Hour < 10 ? "0" : "") + now.Hour + ":" + (now.Minute < 10 ? "0" : "") + now.Minute + ":" + (now.Second < 10 ? "0" : "") + now.Second + "',\r\n";
            hdr += "/* author */ ('" + ParserIfc.ReplaceAe(System.Environment.UserName) + "'),\r\n";
            hdr += "/* organization */ ('" + ParserIfc.ReplaceAe(IfcOrganization.Organization) + "'),\r\n";
            hdr += "/* preprocessor_version */ '" + mFactory.ToolkitName + "',\r\n";
            hdr += "/* originating_system */ '" + ParserIfc.ReplaceAe(mFactory.ApplicationFullName) + "',\r\n";
            hdr += "/* authorization */ 'None');\r\n\r\n";
            hdr += "FILE_SCHEMA (('" + (mRelease == ReleaseVersion.IFC2x3 ? "IFC2X3" : "IFC4") + "'));\r\n";
            hdr += "ENDSEC;\r\n";
            hdr += "\r\nDATA;";
            return(hdr);
        }
Example #2
0
        protected override string BuildStringSTEP()
        {
            string name = mName;

            if (string.IsNullOrEmpty(name))
            {
                name = mDatabase.Factory.ApplicationDeveloper;
            }
            string str = base.BuildStringSTEP() + "," + ParserIfc.ReplaceAe(mIdentification) + ",'" + ParserIfc.ReplaceAe(name) + "'," +
                         ParserIfc.ReplaceAe(mDescription) + (mRoles.Count == 0 ? ",$" : ",(#" + mRoles[0]);

            for (int icounter = 1; icounter < mRoles.Count; icounter++)
            {
                str += ",#" + mRoles;
            }
            str += (mRoles.Count == 0 ? "" : ")") + (mAddresses.Count == 0 ? ",$" : ",(#" + mAddresses[0]);
            for (int icounter = 1; icounter < mAddresses.Count; icounter++)
            {
                str += ",#" + mAddresses[icounter];
            }
            return(str + (mAddresses.Count > 0 ? ")" : ""));
        }