Example #1
0
 internal AcadMLineStyle FriendAddAcadObjectMLineStyleStandard(double nvdblObjectID = -1.0, ref string nrstrErrMsg = "")
 {
     if (mobjAcadMLineStyleStandard == null)
     {
         string dstrMLineStyleName = "Standard";
         mobjAcadMLineStyleStandard = (AcadMLineStyle)FriendGetItem(dstrMLineStyleName);
         if (mobjAcadMLineStyleStandard == null)
         {
             mobjAcadMLineStyleStandard = FriendAddAcadObject(dstrMLineStyleName, Conversions.ToDouble(Interaction.IIf(nvdblObjectID == -1.0, base.Database.FriendGetNextObjectID, nvdblObjectID)), ref nrstrErrMsg);
             if (mobjAcadMLineStyleStandard != null)
             {
                 mobjAcadMLineStyleStandard.FriendAddReactorsID(base.ObjectID, 330);
                 AcadMLineStyleElements elements = mobjAcadMLineStyleStandard.Elements;
                 AcadMLineStyleElements acadMLineStyleElements = elements;
                 object        objectValue        = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, 0.5m, 0.5));
                 Enums.AcColor pnumEntityColor    = hwpDxf_Vars.pnumEntityColor;
                 string        pstrEntityLinetype = hwpDxf_Vars.pstrEntityLinetype;
                 string        nrstrErrMsg2       = "";
                 acadMLineStyleElements.FriendAdd(objectValue, pnumEntityColor, pstrEntityLinetype, ref nrstrErrMsg2);
                 AcadMLineStyleElements acadMLineStyleElements2 = elements;
                 object        objectValue2        = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, -0.5m, -0.5));
                 Enums.AcColor pnumEntityColor2    = hwpDxf_Vars.pnumEntityColor;
                 string        pstrEntityLinetype2 = hwpDxf_Vars.pstrEntityLinetype;
                 nrstrErrMsg2 = "";
                 acadMLineStyleElements2.FriendAdd(objectValue2, pnumEntityColor2, pstrEntityLinetype2, ref nrstrErrMsg2);
                 elements = null;
             }
         }
     }
     return(mobjAcadMLineStyleStandard);
 }
Example #2
0
        public AcadLayer()
        {
            mblnOpened = true;
            base.FriendLetNodeImageEnabledID  = 125;
            base.FriendLetNodeImageDisabledID = 126;
            base.FriendLetNodeName            = "Layer";
            base.FriendLetNodeText            = "Layer";
            object robjObject = this;

            FriendAddToCollection(ref robjObject);
            mnumColor                 = hwpDxf_Vars.pnumLayerColor;
            mblnDependend             = hwpDxf_Vars.pblnDependend;
            mblnFreeze                = hwpDxf_Vars.pblnFreeze;
            mblnLayerOn               = hwpDxf_Vars.pblnLayerOn;
            mstrLinetype              = hwpDxf_Vars.pstrLayerLinetype;
            mdblLinetypeObjectID      = -1.0;
            mnumLineweight            = hwpDxf_Vars.pnumLayerLineweight;
            mblnLocked                = hwpDxf_Vars.pblnLocked;
            mblnPlottable             = hwpDxf_Vars.pblnPlottable;
            mblnResolved              = hwpDxf_Vars.pblnResolved;
            mblnViewportDefault       = hwpDxf_Vars.pblnViewportDefault;
            mdblPlotStyleNameObjectID = -1.0;
            mblnFriendLetFlags        = false;
            InternCalcFlags70();
            base.FriendLetDXFName    = "LAYER";
            base.FriendLetObjectName = "AcDbLayerTableRecord";
        }
Example #3
0
        public static string BkDXF_ColorLongToString(Enums.AcColor vnumColor, bool nvblnGerman = false, bool nvblnNamed = false)
        {
            switch (vnumColor)
            {
            case Enums.AcColor.acByBlock:
                return(Conversions.ToString(Interaction.IIf(nvblnGerman, "VonBlock", "ByBlock")));

            case Enums.AcColor.acByLayer:
                return(Conversions.ToString(Interaction.IIf(nvblnGerman, "VonLayer", "ByLayer")));

            default:
                if (nvblnNamed)
                {
                    switch (vnumColor)
                    {
                    case Enums.AcColor.acRed:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Rot", "Red")));

                    case Enums.AcColor.acYellow:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Gelb", "Yellow")));

                    case Enums.AcColor.acGreen:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "GrĂ¼n", "Green")));

                    case Enums.AcColor.acCyan:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Cyan", "Cyan")));

                    case Enums.AcColor.acBlue:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Blau", "Blue")));

                    case Enums.AcColor.acMagenta:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Magenta", "Magenta")));

                    case Enums.AcColor.acWhite:
                        return(Conversions.ToString(Interaction.IIf(nvblnGerman, "Weiss", "White")));

                    default:
                        return(Strings.Trim(Conversions.ToString((int)vnumColor)));
                    }
                }
                return(Strings.Trim(Conversions.ToString((int)vnumColor)));
            }
        }
Example #4
0
 internal AcadMLineStyleElement FriendAdd(object vvarOffset, Enums.AcColor vnumColor, string vstrLinetype, ref string nrstrErrMsg = "")
 {
     nrstrErrMsg = null;
     checked
     {
         mlngIndex++;
         AcadMLineStyleElement dobjAcadMLineStyleElement2 = new AcadMLineStyleElement();
         dobjAcadMLineStyleElement2.FriendLetNodeParentID     = base.NodeID;
         dobjAcadMLineStyleElement2.FriendLetApplicationIndex = mlngApplicationIndex;
         dobjAcadMLineStyleElement2.FriendLetDocumentIndex    = mlngDocumentIndex;
         dobjAcadMLineStyleElement2.FriendLetDatabaseIndex    = mlngDatabaseIndex;
         dobjAcadMLineStyleElement2.FriendLetIndex            = mlngIndex;
         dobjAcadMLineStyleElement2.Offset   = RuntimeHelpers.GetObjectValue(vvarOffset);
         dobjAcadMLineStyleElement2.Color    = vnumColor;
         dobjAcadMLineStyleElement2.Linetype = vstrLinetype;
         mcolClass.Add("K" + Conversions.ToString(mlngIndex), dobjAcadMLineStyleElement2);
         AcadMLineStyleElement FriendAdd = dobjAcadMLineStyleElement2;
         dobjAcadMLineStyleElement2 = null;
         return(FriendAdd);
     }
 }