1 Reply Latest reply on Sep 26, 2014 10:29 AM by Glenn Schroeder

    Creating P2M Files Manually

    Mike Lamb

      I'm new to using Solidworks and am looking to create more appearance colors. I don't have any use for all the textures, reflections, backgrounds, scenes, etc. I'm coming from IDEAS where my background was all black and each part I made was a random color (red, green, blue, magenta, pink, yellow, etc). I see in my appearances tree what I want, Appearances > Solid but there's only 7 colors in there. I think I figured out how to make new colors in Solidworks, but it's putting them in my own "library" and it takes some time to make each color.


      Is there an easy way to do this manually by copying, for example, blue.p2m in C:\Program Files\SolidWorks Corp\SolidWorks\data\graphics\Materials\solid and renaming the file to "darkgreen.p2m" and changing the values for "col1" by opening the p2m in notepad? I figured out in scenes that Solidworks seems to specify colors by percent of RGB values. If I wanted a colors of 50 red, 25 green, and 150 blue I'd have to divide those values by 255 and enter those into the file. So I got scenes working, just copied the pitch black file and made one that's dark gray, light gray, and light blue.


      So I've got the location of the color file, I know where the preview images are stored so I can make a matching preview image, I just am missing the last step in getting the files to show up in the list. I'm sure many will say why not just create them in Solidworks, but it seems easier for me to open a notepad file and change 3 values for each color I want.



        • Re: Creating P2M Files Manually
          Glenn Schroeder

          Hello Mike,


          Welcome to using SolidWorks.  Right-click on your part name at the top of the tree.  Click on the drop-down beside the Appearances icon (looks like a beach ball), and choose Part.  That will take you to a color task pane where you have 40 colors to choose from, along with fields to enter for RGB or HSV colors if you want something different from the 40 standard colors.  This can also be done for individual bodies or surfaces within a part.


          I believe custom colors can be saved in SW, but I've never needed to.  Someone else can probably help with that.