PeterT Posted April 4, 2017 Share Posted April 4, 2017 On another note, when pasting in a 26x20 pixel tool Icon in the Edit Definition Properties tab, how do you get a high resolution Icon. I made my Icon in Graphic Converter, but when I pasted it in, I got some sort of a message saying that it would be a low resolution Icon if I do not make a high-resolution counterpart, or something like that. What is the technique to get a high resolution tool Icon? Quote Link to comment
JBenghiat Posted April 5, 2017 Share Posted April 5, 2017 Save a copy of the image at double the resolution and append "@2x" to the image file name. VW will search for the second image in the same directory. Hth, Josh Quote Link to comment
PeterT Posted April 5, 2017 Author Share Posted April 5, 2017 Josh, As you Paste the image into the Properties dialog, what directory do I put the High res image into? Where does Vectorworks store the image that was pasted in? Is that where I need to put the high res image? Thanks, Peter Quote Link to comment
JBenghiat Posted April 5, 2017 Share Posted April 5, 2017 Hi Peter, The regular and high resolution images just need to be in the same folder before you import. Select the regular image with the Import PNG Icon..: dialog, and VW will automatically pull in the high res as well. No need to find where VW stores the image. -Josh 1 Quote Link to comment
PeterT Posted April 6, 2017 Author Share Posted April 6, 2017 (edited) Josh, Since Vectorworks and the Plug-ins reside on seven different workstations in my office, are you suggesting I put two image files on each of seven workstations? Or can a workstation copy of Vectorworks pull the icons from our server? I typically Paste the icon in on my workstation, how will the other workstations find it? Is there anything about this on the Developer Page? I have not seen it. Peter Edited April 6, 2017 by PeterT Quote Link to comment
JBenghiat Posted April 6, 2017 Share Posted April 6, 2017 Hi Peter, It's much simpler than you are describing. The icon gets embedded into the plug-in, so after you select the icon with the [Import PNG Icon...] button, you're done. You could even delete the original icons from your workstation if you would like, but the embed process means you can't retrieve an icon from a plug-in. Example workflow: - Create an icon at double resolution. - Save as MyIcon@2x.png - Using your image editor, reduce the resolution in half - Save as MyIcon.png in the same folder as MyIcon@2x.png - In VW Plug-In Manager -> Edit Definition -> Properties, press [Import PNG Icon...] - Select MyIcon.png At this point both MyIcon.png and MyIcon@2x.png embed in the plug-in. As a side note, SDK based plug-ins deal with the icon differently, so don't be confused by any information you may find about adding icons to .vwr files. HTH, Josh Quote Link to comment
PeterT Posted April 7, 2017 Author Share Posted April 7, 2017 (edited) O.K, I am about to give up on this. I have a 26x20 pixel PNG Icon named BLIcon.png, and a 52x40 pixel PNG icon named BLIcon@2x.png. I Open the BLIcon.png file in Preview, Photoshop, or Graphic Converter and they all tell me it is a 26x20 PNG file. In VectorScript I hit the Import PNG Icon... button, select the BLIcon.png file, and get the message that "The PNG file is the wrong size. The dimensions must be 26x20 pixels". I have verified 20 times that it is a 26x20 PNG file yet VectorScript sees it as something else. I cannot spend my whole day trying to import a stupid ICON. I guess I will just have two accept the low res icon since VS will not take the file that it asks for. Here are the two Icons, as I do not know where to go from here. Edited April 7, 2017 by PeterT Quote Link to comment
MullinRJ Posted April 7, 2017 Share Posted April 7, 2017 Peter, I just copied the two images you posted and saved them from Preview to my desktop, naming them appropriately as A.png and A@2x.png. They imported as I expected and invoked no error message. I saved them twice, with and without the alpha channel, but VW imported both versions the same. I am not sure where your problem lies, but I don't think it is with the image files. Raymond Quote Link to comment
PeterT Posted April 7, 2017 Author Share Posted April 7, 2017 Raymond, I do not know how you got them to import. I get the same message every time. I even renamed them the same as you did. Peter Quote Link to comment
JBenghiat Posted April 7, 2017 Share Posted April 7, 2017 I think my last reply didn't go through. Check that both images are at 72 dpi. I found that even if the pixel dimensions are correct, if they are not set for screen resolution, VW will produce an error. Also just confirm that your @2x version is 52 x 40 @ 72 dpi. -Josh Quote Link to comment
PeterT Posted April 7, 2017 Author Share Posted April 7, 2017 OK, I had them both at 600 dpi. I do not understand how you can have a high resolution image at 72 dpi and only 26 x 2o pixels. I will reduce them to 72, but that does not sound high resolution to me. Peter Quote Link to comment
JBenghiat Posted April 7, 2017 Share Posted April 7, 2017 High resolution specifically refers to displays, like Apple's retina displays, that have twice as many pixels per inch. Because the icon size is the same display size on both kinds of screens, 52 x 40 is twice the resolution of 26 x 20, and in comparison, high resolution (or at least 2x resolution). In theory, keeping the image the same measured dimensions, say in mm, but changing the dpi from 72 to 144 should work, but even though the pixel dimensions are incorrect, VW is finicky about it. Personally, I think VW should just look at the pixel dimensions and not the dpi, but that doesn't look like it will change any time soon. The @2x concept is actually a graphics standard and not unique to VW: https://developers.google.com/web/fundamentals/design-and-ui/media/images#relative-sized-images -Josh Quote Link to comment
J. Miller Posted May 15, 2018 Share Posted May 15, 2018 72 DPI resolution killed me too. If only it was mentioned in the dialog that says to use a 26 x 20 pixel image Thanks Josh Quote Link to comment
DCarpenter Posted April 11, 2024 Share Posted April 11, 2024 I lost a couple hours on this issue as well. This thread saved me from pulling the rest of my hair out. Sure would be nice is VW could add that little note to the dialog box that pops up that the image also needs to be 72 dpi. 1 Quote Link to comment
twk Posted October 29, 2024 Share Posted October 29, 2024 (edited) This is not working in 2024, when selecting an icon for a custom plugin: Workflow tested: - icon.png (72 dpi) 26x20(pixel wxh) - icon@2x.png (72 dpi) 52x40(pixel wxh) Anyone successfully assigned icons to a custom plugin/tool in Vectorworks 2024? Edited October 29, 2024 by twk Quote Link to comment
twk Posted October 29, 2024 Share Posted October 29, 2024 Ok, so the solution is to also have a dark version (if you're on windows i believe): So all these must be fullfilled: - icon.png (72 dpi) 26x20(pixel wxh) - icon_dark.png (72 dpi) 26x20(pixel wxh) - icon@2x.png (72 dpi) 52x40(pixel wxh) - icon_dark@2x.png (72 dpi) 52x40(pixel wxh) Works now 1 Quote Link to comment
Jesse Cogswell Posted October 29, 2024 Share Posted October 29, 2024 Also just for your knowledge, starting in VW2024, they have migrated to the .svg file format. It's a vector graphic so it's easier to scale, just need to supply a _dark version and a standard version. It does kind of kill backwards compatibility with earlier versions of VW, though. 1 Quote Link to comment
SamIWas Posted October 29, 2024 Share Posted October 29, 2024 55 minutes ago, Jesse Cogswell said: Also just for your knowledge, starting in VW2024, they have migrated to the .svg file format. It's a vector graphic so it's easier to scale, just need to supply a _dark version and a standard version. It does kind of kill backwards compatibility with earlier versions of VW, though. What is the best way/software/app to create SVG icons? I haven't delved into that yet. Quote Link to comment
twk Posted October 29, 2024 Share Posted October 29, 2024 Icons for Plugins PNGs Need 2 versions, standard and Retina version, and for each a light and dark version (total of 4 files) Normal 26x20 - tool.png // Dark Version = tool_dark.png Doubled 54x40 - tool@2x.png // Dark Version = tool_dark@2x.png Must be 72dpi Icon size must be 26x20 pixels SVGs Need 2 versions, light and dark (total of 2 files only) Normal 26x20 - tool.svg // Dark Version = tool_dark.svg Must be 72dpi Icon size must be 26x20 pixels Online PNG to SVG Converter: https://svgconverter.app/free Online SVG Resize: https://www.iloveimg.com/resize-image 1. Develop or design icon in Vectorworks, to a 26x20 region. (I set a rectangle at this dimension, and set line weight to <None>, and have loci’s at top left and bottom right for easy snapping during export (where you’ll have draw a marquee around region for export). 2. Export png @72dpi. pixel dimensions can be whatever, but higher dimensions are better for svg conversion 3. Upload image to https://svgconverter.app/free. Vectorize, and download 4. Go to https://www.iloveimg.com/resize-image, upload, and resize to 26x20 5. Resize Image then download on next page: 6. You now have your svg file sized to the correct 26x20 dimensions, import now into your plugin via the Vectorworks plugin manager. 2 2 Quote Link to comment
Paolo Posted January 31 Share Posted January 31 To get the correct size svg icons, you can use Vectorworks + Export to SVG menu. I have just set up a template to prepare my plugins icons this way.SVG icons template.sta Just open the template and draw your graphic inside the "print" area then export to SVG using the following settings: 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.