Ejemplo n.º 1
0
 public static void SetLineWidth(DisplayType type, Width widthType)
 {
     PartObject.WidthType  width    = ConvertLineWidthType((DisplayableObject.ObjectWidth)widthType);
     NXOpen.Part           workPart = (NXOpen.Part)WorkPart;
     PartObject.ObjectType type3    = (PartObject.ObjectType)type;
     workPart.Preferences.ObjectPreferences.SetWidth(type3, width);
 }
Ejemplo n.º 2
0
 public static void SetLineFont(DisplayType type, Font lineFontType)
 {
     PartObject.LineFontType lineFont = ConvertLineFontType((DisplayableObject.ObjectFont)lineFontType);
     NXOpen.Part             workPart = (NXOpen.Part)WorkPart;
     PartObject.ObjectType   type3    = (PartObject.ObjectType)type;
     workPart.Preferences.ObjectPreferences.SetLineFont(type3, lineFont);
 }
Ejemplo n.º 3
0
        public static void SetColor(DisplayType type, System.Drawing.Color color)
        {
            int num = Snap.Color.ColorIndex(color);

            NXOpen.Part           workPart = (NXOpen.Part)WorkPart;
            PartObject.ObjectType type2    = (PartObject.ObjectType)type;
            workPart.Preferences.ObjectPreferences.SetColor(type2, num);
            if (type == DisplayType.AllButDefault)
            {
                ColorOfAllButDefault = color;
                StateOfAllButDefault = true;
            }
        }
Ejemplo n.º 4
0
        public static System.Drawing.Color GetColor(DisplayType type)
        {
            NXOpen.Part           workPart = (NXOpen.Part)WorkPart;
            PartObject.ObjectType type2    = (PartObject.ObjectType)type;
            int color = workPart.Preferences.ObjectPreferences.GetColor(type2);

            if (color > 0xff)
            {
                return(Color);
            }
            if (color == 0)
            {
                return(ColorOfAllButDefault);
            }
            return(Snap.Color.WindowsColor(color));
        }
Ejemplo n.º 5
0
 public static Width GetLineWidth(DisplayType type)
 {
     NXOpen.Part           workPart = (NXOpen.Part)WorkPart;
     PartObject.ObjectType type2    = (PartObject.ObjectType)type;
     return((Width)ConvertLineWidthType(workPart.Preferences.ObjectPreferences.GetWidth(type2)));
 }
Ejemplo n.º 6
0
 public static Font GetLineFont(DisplayType type)
 {
     NXOpen.Part           workPart = (NXOpen.Part)WorkPart;
     PartObject.ObjectType type2    = (PartObject.ObjectType)type;
     return((Font)ConvertLineFontType(workPart.Preferences.ObjectPreferences.GetLineFont(type2)));
 }