internal AcadDimStyle FriendAddAcadObjectDimStyleDefault(double nvdblObjectID = -1.0, ref string nrstrErrMsg = "") { if (mobjAcadDimStyleDefault == null) { string dstrDimStyleName = Conversions.ToString(Interaction.IIf(Operators.ConditionalCompareObjectEqual(base.Application.FriendGetVariable("MEASUREINIT"), 0, TextCompare: false), "ISO-25", "Standard")); mobjAcadDimStyleDefault = (AcadDimStyle)FriendGetItem(dstrDimStyleName); if (mobjAcadDimStyleDefault == null) { mobjAcadDimStyleDefault = FriendAddAcadObject(dstrDimStyleName, Conversions.ToDouble(Interaction.IIf(nvdblObjectID == -1.0, base.Database.FriendGetNextObjectID, nvdblObjectID)), ref nrstrErrMsg); } } return(mobjAcadDimStyleDefault); }
internal AcadDimStyle FriendAddAcadObject(string vstrName, double nvdblObjectID = -1.0, ref string nrstrErrMsg = "") { AcadDimStyle dobjAcadDimStyle4 = new AcadDimStyle(); if (nvdblObjectID == -1.0) { nvdblObjectID = base.Database.FriendGetNextObjectID; } AcadDimStyle acadDimStyle = dobjAcadDimStyle4; acadDimStyle.Name = vstrName; acadDimStyle.FriendLetNodeParentID = base.NodeID; acadDimStyle.FriendLetApplicationIndex = base.FriendGetApplicationIndex; acadDimStyle.FriendLetDocumentIndex = base.FriendGetDocumentIndex; acadDimStyle.FriendLetDatabaseIndex = base.FriendGetDatabaseIndex; acadDimStyle.FriendLetOwnerID = base.ObjectID; AcadDimStyle acadDimStyle2 = acadDimStyle; double vdblObjectID = nvdblObjectID; AcadObject nrobjAcadObject = dobjAcadDimStyle4; bool flag = acadDimStyle2.FriendSetObjectID(vdblObjectID, ref nrobjAcadObject, ref nrstrErrMsg); dobjAcadDimStyle4 = (AcadDimStyle)nrobjAcadObject; bool dblnValid = default(bool); if (flag) { dblnValid = true; } else { hwpDxf_Functions.BkDXF_DebugPrint(acadDimStyle.ObjectName + ": " + nrstrErrMsg); } acadDimStyle = null; AcadDimStyle FriendAddAcadObject = default(AcadDimStyle); if (dblnValid) { AcadTableRecord robjAcadTableRecord = dobjAcadDimStyle4; Add(ref robjAcadTableRecord, vstrName); dobjAcadDimStyle4 = (AcadDimStyle)robjAcadTableRecord; FriendAddAcadObject = dobjAcadDimStyle4; } dobjAcadDimStyle4 = null; return(FriendAddAcadObject); }