Skip to content

Instantly share code, notes, and snippets.

internal class Module1 : Module
{
private static Module1 _this = null;
/// <summary>
/// Retrieve the singleton instance to this module here
/// </summary>
public static Module1 Current => _this ??= (Module1)FrameworkApplication.FindModule("Addin_Module");
#region Overrides
@jseger
jseger / Number.cs
Last active August 29, 2015 14:23
C# IsPrime
public class Number
{
public bool IsPrime(int number)
{
return number == 1 || number > 3 ? Enumerable.Range(2, (int)Math.Sqrt(number) + 1).All(x => number % x != 0) : number == 2 || number == 3;
}
}
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSketchMgr As SldWorks.SketchManager
Dim swExcel As Excel.Application
Dim exSheet As Excel.Worksheet
Dim i As Integer
Dim xpt As Double
Dim ypt As Double
Dim zpt As Double
Sub main()