Table of Contents

Class AddinIcons

Namespace
Hymma.Solidworks.Addins
Assembly
Hymma.Solidworks.Addins.dll

generates SolidWORKS ready icons

[ComVisible(true)]
public static class AddinIcons
Inheritance
AddinIcons
Inherited Members

Methods

CreatePropertyManagerPageIconsDir(AddinUserInterface)

Creates sub directory under the IconsRootDir for the PmpUiModel

public static void CreatePropertyManagerPageIconsDir(AddinUserInterface addinUi)

Parameters

addinUi AddinUserInterface

Remarks

is public for testing

Exceptions

Exception

CreateSubDirForUiItems(AddinUserInterface)

this method is public for testing only. It will generate necessary sub-folders in the IconsRootDir so an icon in a property manager page or ui tab has its unique path even when used in multiple controllers

public static void CreateSubDirForUiItems(AddinUserInterface addinUi)

Parameters

addinUi AddinUserInterface

CreateTabIconsDir(AddinUserInterface)

Creates sub directory under the IconsRootDir for the AddinCommand

public static void CreateTabIconsDir(AddinUserInterface addinUi)

Parameters

addinUi AddinUserInterface

Remarks

is public for testing

Exceptions

Exception

GetAddinIcon(Type)

extracts image by its name as identified in AddinIcon

public static Bitmap GetAddinIcon(Type type)

Parameters

type Type

the type the has the attribute, the main addin class

Returns

Bitmap

a bitmap object

Remarks

this method is public for testing only

SaveAsStandardSize(Bitmap, string, string)

Solidworks Addin icons has to be in 16x16 anything else fails. this method converts a random image file into a size recognizable by solidworks

public static string SaveAsStandardSize(Bitmap image, string directory, string file)

Parameters

image Bitmap

the image obj to convert to png format in 16x16

directory string

the directory to save the file

file string

the name of the file. the extension does not matter.

Returns

string

full file name of the modified image