weianweigan / DuSolidWorksExtension

Lots of useful extension methods for Interface of SolidWorks Api

Home Page:https://weianweigan.github.io/DuSolidWorksExtension/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lang Github Github

DuSolidWorksExtension

English | 中文

Lots of very useful extension methods for SolidWorks api.

Based on https://github.com/Weingartner/SolidworksAddinFramework

Install

PM> Install-Package Du.SolidWorks -Version 0.1.1

Usage

1. Add namespace firstly

using Du.SolidWorks.Extension;
using Du.SolidWorks.Math

2. You can use almost extension methods

  • EquatiomMgr Extension Methods

var doc = _addin.SwApp.ActiveDoc as ModelDoc2;

var equ = doc.GetEquationMgr().GetAllEqu().
          Where(p => p.GlobalVariable).Select(p => p.VarName);


  • CustomPropertyManager Extension Methos

var doc = _addin.SwApp.ActiveDoc as ModelDoc2;

var dateProerty = doc.Extension.CustomPropertyManager[""].GetAllProperty()
                ?.Where(p => p.Value.Contains("日期"))?.Select(p => p.Name);

Document

Contact me

email

About

Lots of useful extension methods for Interface of SolidWorks Api

https://weianweigan.github.io/DuSolidWorksExtension/

License:GNU General Public License v3.0


Languages

Language:C# 99.3%Language:JavaScript 0.4%Language:CSS 0.2%Language:ASP 0.1%Language:PHP 0.1%Language:Batchfile 0.0%