C# SolidWorks API Tutorial - 01 Getting Started Creating Taskpane

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • The first of the long awaited SolidWorks API tutorials using C# and the latest code.
    This video shows you how to create and register a taskpane add-in ready for you to start your projects on.

КОМЕНТАРІ • 122

  • @PurushNahiMahaPurush
    @PurushNahiMahaPurush 6 років тому +5

    Holy moly! I cannot thank you enough for these tutorials! I have been wanting to get into Addin development for Solidworks mainly for my own startup and enhance my very rusty amateur C# skills. But had absolutely no clue how to even get started and Solidworks themselves have such little information out on the web despite me buying a (very expensive) license of their product. I wish Dassault would be more like Autodesk with their approach to putting our documentation and information on the Internet for hobbyists to develop for their damn software.
    So, thank you very much and I hope you will make more informative tutorials like these in the future :)

    • @AngelSix
      @AngelSix  6 років тому

      Glad I could help. I'll carry on with the series shortly

  • @noraswatinfotainment
    @noraswatinfotainment 7 років тому +9

    thanks bro. been looking this for years! already tried this add succeeded. please make more videos like this. really appreciate your work man.

  • @watsonshum
    @watsonshum 5 років тому

    I am a Chinese student,but there are no such tutorial vedios in my language,I can make progress by watching yours.Thanks for your efforts.

    • @AngelSix
      @AngelSix  5 років тому

      Your welcome. Glad I could help

  • @steven-ui7sz
    @steven-ui7sz 7 років тому

    Great Video. I am a C# developer who has never seen Solidworks - but was assigned the task of creating an add-in for engineers in my office. This should help immensely. Thanks again.

    • @AngelSix
      @AngelSix  7 років тому

      Awesome. This should get you going, then specific help you can also try the SolidWorks API forums too

  • @mandarparkhi3708
    @mandarparkhi3708 3 роки тому +1

    Thanks a lot Luke. The tutorial is very useful.

  • @aleXelaMec
    @aleXelaMec 5 місяців тому

    If I have two solidworks versions o my machine, how can i choose which interop to load? or should i simply use last version which (i suppose) support back compatibility? or should I have both DLLs for each version? if so, how will I domically load right version? thanks

  • @user-pu2zp2ke2l
    @user-pu2zp2ke2l 7 місяців тому

    Hi luk, as always a great tuto thanks,
    Is ther a specification for icons, tried to resize, create one withe inkscape (24,32....)but with no chance, any ideas !

  • @Alar0
    @Alar0 7 років тому +1

    Awesome ! Have been looking a long time such a good and easy to follow API tutorial !

  • @PaulYoungDCU
    @PaulYoungDCU 6 років тому

    A great way to get started. Good explanations of what the code is designed to do as you go along.
    I had used the command line registration before you mentioned your installer/uninstaller, the only piece missing was the command line for the de-registration of the add-in.

    • @AngelSix
      @AngelSix  6 років тому

      Glad you like it. Hopefully its useful

    • @ibobiras7
      @ibobiras7 3 місяці тому

      regasm /u "[full path to your DLL in double quotes]". Found it on stackoverflow from Erik Oosterwaal

  • @vinothkanna5484
    @vinothkanna5484 3 роки тому

    Thanks a lot Luke. May God Bless You.

  • @ullekhbodhanker
    @ullekhbodhanker 5 років тому

    Thanks for the amazing tutorial...Please give us more of such tutorial.

  • @SachinMM
    @SachinMM 6 років тому +1

    double like :).
    this will definitely inspire many new API programmers

    • @AngelSix
      @AngelSix  6 років тому +1

      Thanks glad you like it :)

  • @shubhamnawhade6085
    @shubhamnawhade6085 Рік тому

    Thank you for the tutorials.
    Can you create a tutorial for SolidWorks Document Manager API?

  • @_Ahmed_O
    @_Ahmed_O 3 роки тому

    I really appreciate your time and effort, thank u for this great tutorial, you helped me a lot.

  • @kesukaka9940
    @kesukaka9940 4 роки тому +1

    Hey Luke,
    These tutorials are great. Thank you for creating them.
    question: How can I register the addin through an exe instead of manually adding it via the installer.
    Andy

  • @scottbrew87
    @scottbrew87 6 років тому

    Very helpful, thank you for taking the time to do this. It is very much appreciated!

  • @morganddoane
    @morganddoane 4 роки тому +1

    Amazing. Thanks so much!

  • @sitmikhmusicchannel7810
    @sitmikhmusicchannel7810 2 роки тому

    SW Addin sees but does not launch it. With manual permission through the settings, it simply does not turn on. I do not know what to do. Did it exactly according to the video

  • @gianlucataroni7222
    @gianlucataroni7222 3 роки тому +1

    Thanks a lot, very useful. I used it as base for my add in. Now I need to open a drawing file and export it in dxf and pdf. Is there anybody who can help me please? Thank you!

  • @StockEchoes
    @StockEchoes 5 років тому

    Great Video..Will you please post video regarding macro feature creation API's and its behaviour in solidworks..

  • @trinhngocphi5362
    @trinhngocphi5362 2 роки тому

    i have a trouble with my codes. So How can i call Solidworks then macro directly by C# WPF? thanks!

  • @aleXelaMec
    @aleXelaMec 8 місяців тому

    Thanks for this one!
    but im having an issue with comregister. not updating my registry (
    same code, used regasm /codebase in admin mode. nothing (
    cannot get why.
    it adds my GUID to registry under classes root, but not adding to SW Addins folder (

    • @aleXelaMec
      @aleXelaMec 8 місяців тому

      found! it adds it to WOW6432Node\SolidWorks. not to main
      Console.WriteLine(rk); show right place. but saves to wrong (

    • @aleXelaMec
      @aleXelaMec 8 місяців тому

      my mistake! i wasnt in framework64. now its ok.

  • @tahadaoud886
    @tahadaoud886 7 місяців тому

    hi . i have a probleme with SldWorks type it says that it is a name space and not a class !! any solution ?

  • @younes424
    @younes424 7 років тому

    This is awesome!
    Thank you!!

  • @petermaczik5334
    @petermaczik5334 4 роки тому

    Thank you so much for your in depth tutorials, you are the man!!! I'm having trouble with the add in UI tho, the add in loads but the UI is frozen and doesn't load the pane in my taskpanehostUI.cs[Design]....plz help this newbie!

    • @AngelSix
      @AngelSix  4 роки тому +1

      Install this marketplace.visualstudio.com/items?itemName=AngelSix.soliddna-blank then just go to File New Project and you can create a SolidDNA template project ready to go

    • @petermaczik5334
      @petermaczik5334 4 роки тому

      @@AngelSix Ok lemme give that a try, thx Luke!!! I'll def be buyin some merch or donating very soon...Keep up the good work man!

  • @nimiz2k
    @nimiz2k 5 років тому

    You are an IDOL!

  • @afsalmohamedkani.m9693
    @afsalmohamedkani.m9693 3 місяці тому

    Can i build custom add-in for my own use

  • @AHNT
    @AHNT 6 років тому

    Thank you for this nice tutorial!

  • @klausfischer358
    @klausfischer358 5 років тому

    Thanks AngelSix for your awesome tutorials.
    I have a general question to SolidWorks Addins: It is possible to run methods like SldWorks.OpenDoc6 or ModelDocExtension.SaveAs Asynchronously? (I am using the .Net 4.6.2 )

    • @AngelSix
      @AngelSix  5 років тому

      If you run them in your app in a Task.Run its async to your own UI but not necessarily to SolidWorks own UI thread.

  • @MegaItalMF
    @MegaItalMF 5 років тому

    Hi Luke! I'm just staring with Soliworks API, but I've seen that using C# you need to install Solidworks API SDK to have a template in Visual Studio to create Addins, and I'm confused because you don't follow the same path, so with you "Solidworks Add-in installer" is not neccesary install SDK ? Thanks for your tutorials!

    • @AngelSix
      @AngelSix  5 років тому +1

      The SDK is not needed for this, no. Install SolidDNA templates if you want to create my templates easier marketplace.visualstudio.com/items?itemName=AngelSix.soliddna-blank

  • @YasinKAYA-do4ek
    @YasinKAYA-do4ek 11 місяців тому

    TaskpaneHostHUI does not exist. Why?

  • @asian1nvasion
    @asian1nvasion 7 років тому

    I get an "unexpected response" error message when I tried to install my dll. Then I tried installing your Blank Add-in file on Github and it installs successfully. What could be causing this??

  • @darrengray4199
    @darrengray4199 4 роки тому

    Awesome, just what I need, are you doing anything else, where do I find it?

  • @RRVR4
    @RRVR4 2 роки тому

    i have completed the add task pane but with command prompt i can not add addin can you seend me the link for downloading the solidwprks add in installer

  • @abinavshankar
    @abinavshankar 6 років тому

    @AngelSix My .Net target framework is set to 2.0. But I'm using Visual Studio2017 and it has .Net framework 4.7 built into it. Why is that? And there is also no Assembly Information button as shown in 2:41

    • @AngelSix
      @AngelSix  6 років тому

      You are targeting .Net Framework 2.0 or .Net Core 2.0? I would target 4.7.2 for Framework

  • @edafeclintiduh3754
    @edafeclintiduh3754 3 роки тому

    Hello AngleSix...
    This is very helpful. So I am currently looking for the Add-in Installer and couldn’t find it the GitHub page.
    Please how can I get access to that?

  • @StavrouGeorgios77
    @StavrouGeorgios77 7 років тому

    JUST GREAT!!!

  • @selvandus4944
    @selvandus4944 6 років тому

    You are great, thank you bro....!!!

  • @rudyvaldez
    @rudyvaldez 3 роки тому

    That's bad ass!

  • @gottfriedleibniz6891
    @gottfriedleibniz6891 4 роки тому

    Thank you!

  • @saurabhmuthiyan
    @saurabhmuthiyan 4 роки тому

    Hi,
    I want to build Solidworks to PLM connector, can you help me here? I don't have much background of Solidworks, my expertise is PLM customization and webservices. I want to integrate solidworks drawings to PLM. Can you please help me from where I should start? Thanks in advance

  • @robertoneto6984
    @robertoneto6984 3 роки тому

    Great video mate! I only have one little issue
    I got the add-in installed and available in solidworks just fine, but the image doesn't load on the icon on the right task panel, instead solidworks is using a general panel image it seems.
    Now, I'm quite new to c# which mean it's definitely 100% my fault, but I can't find what I did wrong. Wondering if you have any clue of what's going on.
    I'm using the same image you used btw.

    • @user-pu2zp2ke2l
      @user-pu2zp2ke2l 7 місяців тому

      Hi bro, same issue her, did found a solution ?

  • @lly7655
    @lly7655 Рік тому

    Hi Luke,
    Thanks for your tutorials and hard work. I would hope I have really tried on this years ago.
    But after trying for days, I got the same problem - "a project with an output type of class library cannot be started directly."
    Is it because I am using visual studio 2022, a different framework (4.7.2), or because of SolidWorks 2018?
    Many Thanks

    • @taco0077
      @taco0077 Рік тому

      You just have to choose a project that can execute as the start project. Like a console application or a wpf.

    • @lly7655
      @lly7655 Рік тому

      @@taco0077 thanks, but it's ok now as long as it goes to property and start as external program - Solidworks exe

  • @parthpatel-ov6mq
    @parthpatel-ov6mq 6 років тому

    It's great.
    Actually I'm totally new for programming and coading. I am from mechanical field and I don't know about anything programming. But I would like to learn so what's will be the first stage for starting to learn API

    • @AngelSix
      @AngelSix  6 років тому +1

      I have 2 free books at www.angelsix.com/solidworks just download the Macros and Files and the books are in there

    • @parthpatel-ov6mq
      @parthpatel-ov6mq 6 років тому

      AngelSix thanks

  • @user-wh3mt8xd3k
    @user-wh3mt8xd3k 3 роки тому

    Hey ! i can't find "bin" directory in your public repository( please help

    • @jakee2455
      @jakee2455 3 роки тому +1

      Just need to open the solution to SolidWorksApi.AddinInstaller and build. "Bin" directory will then be created.

  • @JoseAppAL
    @JoseAppAL 7 років тому

    Hello Angel SIx, my code seems to run correctly but my logo and the title and description don´t appear, do you know why?
    I don´t have any error during debugging

    • @AngelSix
      @AngelSix  7 років тому

      Can you send me your code to contact@angelsix.com and I'll take a look

  • @ogjobyogjo
    @ogjobyogjo 7 років тому

    thank you so much!

  • @leeblackharry
    @leeblackharry 7 років тому

    I don't see the bin folder in the zip file on the GitHub repository. I managed to run the program using the Visual Studio project file. When I selected my dll file and clicked install, I get an Unexpected Response window that pops up:
    Microsoft.NET Framework Assembly Registration Utility version 4.6.1586.0 for Microsoft.NET Framework version 4.6.1586.0

    • @AngelSix
      @AngelSix  7 років тому

      leeblackharry double check your code and compare it to the github code. if it fails something is mistyped or wrong

    • @leeblackharry
      @leeblackharry 7 років тому

      I decided to use your code directly from github and renamed some things to reflect what I wanted. I got it to work now. The question that I have is how can I go about modifying the code to make the taskpane load up when I click a custom icon in a menu and have it show on the left side instead of the right? I basically want to make my own SolidWorks tool.

    • @AngelSix
      @AngelSix  7 років тому

      Taskpanes appear in the right that is kind of fixed. You can create a PMP on the left only. A third option is to create your own Windows WPF form that you show, but it wont be pinned inside SolidWorks. Best option is to just accept its on the right. To load it from another button just run a macro from that button I presume you are doing (or you can create a menu item in the add-in directly my next video will show that) then use the SolidWorks API swApp.LoadAddIn call

  • @odaakane
    @odaakane 5 років тому

    Is it possible to write a macro to change Font height under Options / Document Properties / Dimensions ?

    • @AngelSix
      @AngelSix  5 років тому

      Yeah I would say so. Simplest thing, go to the menu in SolidWorks and start recording a macro. Then edit that property. Then stop the macro and look at what code it recorded

  • @johnpelitidis6297
    @johnpelitidis6297 7 років тому

    Awesome

  • @hamedashrafi4885
    @hamedashrafi4885 7 років тому

    Could you show how a .msi file could be made from this? so the end user just installs the Add-in through that. thanks

    • @AngelSix
      @AngelSix  7 років тому

      We will get around to installers but it won't be for a while. We will likely use Wix wixtoolset.org/

  • @nali7561
    @nali7561 7 років тому

    unable to register the dll file. do you have the register exe file?

  • @RRVR4
    @RRVR4 2 роки тому

    how can i install solidworks addin installer

  • @ajayroxxful
    @ajayroxxful 6 років тому

    Awesome!!! Can u make the same tutorial for Creo/ProE

    • @AngelSix
      @AngelSix  6 років тому

      I mainly focus on SolidWorks at the minute put possibly in the future yes

  • @Anilkumar-sq4tp
    @Anilkumar-sq4tp 2 роки тому

    Hi , can you do the same for NxOpen API ? If possible please do using python.

  • @TuNguyen-vp2kf
    @TuNguyen-vp2kf 6 років тому

    Thank you very much. But, how to read custom properties of assembly. Don't need export file excel.

    • @AngelSix
      @AngelSix  6 років тому

      Just use ActiveModel.UnsafeObject.CustomInfo2

    • @TuNguyen-vp2kf
      @TuNguyen-vp2kf 6 років тому

      How to save custom properties of assembly on array ?
      You can example detail do it.
      Thanks.

    • @AngelSix
      @AngelSix  6 років тому

      Thats just normal SolidWorks API stuff, just ask the question on the SolidWorks API forums, I don't have time to do detailed code on comments here. When I get time I do videos on specific topics and help in general on comments

  • @luigifasano2332
    @luigifasano2332 7 років тому

    At min 25:50 missing > mTaskpaneView = mSolidworksApplication.createTaskpaneView2....

    • @AngelSix
      @AngelSix  7 років тому

      Luigi Fasano that's done on line 95 above

    • @noraswatinfotainment
      @noraswatinfotainment 7 років тому

      making the same mistake also. but later found out by myself.

    • @RickMcMichael
      @RickMcMichael 3 роки тому

      I missed this too. Comments to the rescue!

  • @yangxu8589
    @yangxu8589 6 років тому

    Great job! Could anyone tell me whether the add-in created by SolidWorks API 2017 can work with SolidWorks 2018 or not and how to load it? I created an add-in using SolidWorks API 2017 and tried to load it on SolidWorks 2018 but nothing happens. Thanks in advance!

    • @AngelSix
      @AngelSix  6 років тому

      Sure it will work. Check out my newer videos you can create add-ins now directly inside Visual Studios "New Project" with my SolidDNA templates

    • @yangxu8589
      @yangxu8589 6 років тому

      Thank you, bro. It really works. Thanks again!

  • @Swatabhau_youtube
    @Swatabhau_youtube 6 років тому +1

    How to get that reference and related folder at 0:52 sec. Please share link

    • @AngelSix
      @AngelSix  6 років тому +1

      All the source code is here github.com/angelsix/solidworks-api

    • @Swatabhau_youtube
      @Swatabhau_youtube 6 років тому

      AngelSix Thanks. Also for tutorials

  • @philippe5326
    @philippe5326 5 років тому

    Doesn't work for me, I have an issue
    I've tried both the Command Promt as administrator and the SolidWorksAddinInstaller I got from your GitHub but I still get the same error message displayed at 38:59
    Your file (AngelSix.SolidWorks.BlankAddin) runs just fine. It also has a lot more files in the Debug folder.
    I've checked for spelling or other mistakes but I can't find any. Does anyone have an idea as to why this is ? Any help would be appreciated !

    • @AngelSix
      @AngelSix  5 років тому

      Your SOLIDWORKS DLL files set to embed interrop false?

    • @AngelSix
      @AngelSix  5 років тому

      Also do you have rights on the PC to write to registry? Are you an admin?

    • @philippe5326
      @philippe5326 5 років тому

      @@AngelSix Hi ! Thank you for your reply, it's very much aprreciated !
      I restarted the project from scratch and set all the SolidWorks.Interop... DLL files in the 'References' section of Visual Studio to embed interrop false.
      Good news is that the error message is gone ! I get the "Add-in was succesfully registered" message
      Bad news is that the add-in does not show up in SW at all. Neither in the left panel nor in the Tools → Add-Ins Menu
      Those I run on the GitHub Tutorial appear withou any issues, so it must be an issue on my end

    • @AngelSix
      @AngelSix  5 років тому

      Just watch later videos I made an extension to VS so you can just create projects from inside VS already setup right

  • @user-dw3tn8rp3d
    @user-dw3tn8rp3d 7 років тому

    This is amazing! I owe you beer and chips. The official add-in template has a lot of .Net incompatibilities making it unable to run. Your one is of a lot of "handjob", but working and very helpful.

  • @johnmccall9767
    @johnmccall9767 7 років тому

    thanks

  • @ahmedhamed07
    @ahmedhamed07 5 років тому

    can you share the link to "Solidworks Add-in installer" ??

    • @AngelSix
      @AngelSix  5 років тому

      github.com/angelsix/solidworks-api/tree/develop/Tools/Addin%20Installer

    • @ahmedhamed07
      @ahmedhamed07 5 років тому

      Thanks man :)

    • @ahmedhamed07
      @ahmedhamed07 5 років тому

      Thanks for your videos... Can't describe how it was very helpful to me and others 😊
      And I was wondering.. Is there any way to get the wight of the opened part and it's boundaries via add in?

  • @vharish9114
    @vharish9114 6 років тому +1

    what is solid works?

    • @AngelSix
      @AngelSix  6 років тому +2

      v harish it's software to design 3D stuff for engineering (not so much graphical design). I do software for them too

    • @PurushNahiMahaPurush
      @PurushNahiMahaPurush 6 років тому

      Its a CAD software mainly used by Mechanical Engineers to design machines, engineering drawings and structures.

  • @tomas120
    @tomas120 7 років тому

    What is Solid Works?

    • @AngelSix
      @AngelSix  7 років тому

      +TomiXo 3D CAD package. I make software for it and mess with their API sometimes

    • @litvintuteishy5326
      @litvintuteishy5326 Рік тому

      ​@@AngelSixcan you explain where you set what you future blank will field custom feature of model... can i change this function to anover what will field weldment cut list?

  • @ukaszstrzepka8690
    @ukaszstrzepka8690 3 роки тому

    Thanks for this video!