Exemple #1
0
 public Vis(ISldWorks _swApp, IModelDoc2 _myModel)
 {
     myModel = _myModel;
     swApp = _swApp;
     myModel = (ModelDoc2)swApp.ActiveDoc;
     myPart = (PartDoc)myModel;
     myMatVisProps = myPart.GetMaterialVisualProperties();
 }
Exemple #2
0
 public Vis(ISldWorks _swApp, IModelDoc2 _myModel)
 {
     myModel       = _myModel;
     swApp         = _swApp;
     myModel       = (ModelDoc2)swApp.ActiveDoc;
     myPart        = (PartDoc)myModel;
     myMatVisProps = myPart.GetMaterialVisualProperties();
 }
Exemple #3
0
        private void dump_material_visual_properties(MaterialVisualPropertiesData myMatVisProps, PartDoc myPart)
        {
            string configName   = null;
            string databaseName = null;
            string propName     = null;
            //bool bBlendColor = false;
            bool bApplyColor      = false;
            bool bApplyAppearance = false;

            configName   = "default";
            databaseName = null;
            propName     = myPart.GetMaterialPropertyName2(configName, out databaseName);

            if ((myMatVisProps != null))
            {
                //bBlendColor = myMatVisProps.BlendColor;
                bApplyColor      = myMatVisProps.ApplyMaterialColorToPart;
                bApplyAppearance = myMatVisProps.ApplyAppearance;


                ////MessageBox.Show("   SolidWorks standard texture scale = " + dScale + ", Angle = " + dAngle);
                //if (bBlendColor == false)
                //{
                //    //MessageBox.Show("   Do not blend part color with SolidWorks standard texture.");
                //}
                //else
                //{
                //    //MessageBox.Show("   Blend part color with SolidWorks standard texture.");
                //}

                if (bApplyColor == false)
                {
                    //MessageBox.Show("Do not apply material color to part.");
                }
                else
                {
                    //MessageBox.Show("Apply material color to part.");
                }

                if (bApplyAppearance == false)
                {
                    //MessageBox.Show("Do not apply appearance.");
                }
                else
                {
                    //MessageBox.Show("Apply appearance.");
                }
            }
        }
Exemple #4
0
        private void dump_material_visual_properties(MaterialVisualPropertiesData myMatVisProps, PartDoc myPart)
        {
            string configName = null;
            string databaseName = null;
            string propName = null;
            //bool bBlendColor = false;
            bool bApplyColor = false;
            bool bApplyAppearance = false;
            configName = "default";
            databaseName = null;
            propName = myPart.GetMaterialPropertyName2(configName, out databaseName);

            if ((myMatVisProps != null))
            {
                //bBlendColor = myMatVisProps.BlendColor;
                bApplyColor = myMatVisProps.ApplyMaterialColorToPart;
                bApplyAppearance = myMatVisProps.ApplyAppearance;

                ////MessageBox.Show("   SolidWorks standard texture scale = " + dScale + ", Angle = " + dAngle);
                //if (bBlendColor == false)
                //{
                //    //MessageBox.Show("   Do not blend part color with SolidWorks standard texture.");
                //}
                //else
                //{
                //    //MessageBox.Show("   Blend part color with SolidWorks standard texture.");
                //}

                if (bApplyColor == false)
                {
                    //MessageBox.Show("Do not apply material color to part.");
                }
                else
                {
                    //MessageBox.Show("Apply material color to part.");
                }

                if (bApplyAppearance == false)
                {
                    //MessageBox.Show("Do not apply appearance.");
                }
                else
                {
                    //MessageBox.Show("Apply appearance.");
                }

            }
        }