-
Re: Video Tutorials - What would you like?
Christian Chu Nov 20, 2016 11:48 AM (in response to Luke Malpass)Welcome back, Luke and surely many have been missing you too
I think VB .NET is more popular and many here still have trouble making their first Add-in. It'd be nice if you have some video tutorials about this.
-
Re: Video Tutorials - What would you like?
Luke Malpass Nov 20, 2016 11:59 AM (in response to Christian Chu)Yeah... VB.Net... I would really prefer people to learn C#. There is no reason to use VB.Net other than the fact of it being an easier transition from VBA.
Certainly my first few videos will be about recording some VBA Macros, and converting them to C#, as well as one or two videos on making a basic C# application that connects to the active SolidWorks and then can run code against it. Future videos would then do taskpane integration, and then specifics.
It's mainly the specifics I'm thinking of. The videos I will definitely make first are:
1. Converting a VBA macro to C# and general getting started
2. Creating your first C# program that interacts with the active SolidWorks
3. Creating a taskpane integrated add-in
Beyond that, other than me blindly going through every function of the API, I feel it's better to simply go off demand for what people want, and make videos on them.
Hopefully I should be able to push out a video a week, ideally starting in 2-3 weeks as I fly out on business again in a week and will be gone for another few weeks, but I definitely plan to start this ball rolling.
-
-
Re: Video Tutorials - What would you like?
Jaja Jojo Nov 20, 2016 12:05 PM (in response to Luke Malpass)i like to see the basic, intermediate, advanced and highly advanced tutorials in C# programming because im not a programmer and i like to learn how to use it to create program that is usefull to me
-
Re: Video Tutorials - What would you like?
Luke Malpass Nov 20, 2016 12:21 PM (in response to Jaja Jojo)My current videos will cover all C# language anyway so they will be coming in time just subscribe to my YouTube and you will get an email every time I post a video
-
Re: Video Tutorials - What would you like?
Jaja Jojo Nov 20, 2016 7:26 PM (in response to Luke Malpass)yap already done that, cool tutorials thanks
-
-
-
Re: Video Tutorials - What would you like?
Deepak Gupta Nov 20, 2016 12:10 PM (in response to Luke Malpass)Hi Luke, welcome back.
Great idea on the video and thanks for sharing your thoughts about them. I would suggest to go from basic level with simple tasks first, like save as PDF, DXF from drawing or export models as step, iges, etc. This would help people with no or little expertise with programming and specially with C# to absorb the information at an adequate pace.
-
Re: Video Tutorials - What would you like?
Luke Malpass Nov 20, 2016 12:23 PM (in response to Deepak Gupta)Good ideas. I'll start with some basic exporting type examples.
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 27, 2016 6:18 PM (in response to Deepak Gupta)Deepak, your up next. I'll do exporting in the next video. DXF, PDF, multiple sheets, Step, and Iges.
-
Re: Video Tutorials - What would you like?
Shon Owl Jan 16, 2017 12:20 PM (in response to Deepak Gupta)С ++ works quicker imho. C# processes more slowly.
-
-
Re: Video Tutorials - What would you like?
Adam Hoffman Nov 21, 2016 8:25 AM (in response to Luke Malpass)Hello Luke,
I've done a couple of simple taskpane add ins and would was thinking of trying to play around with the PropertyManagerPage. It would be nice to see a detailed video on utilizing this for beginners.
-
Re: Video Tutorials - What would you like?
Luke Malpass Nov 21, 2016 8:53 AM (in response to Adam Hoffman)Sure I can do the PMP stuff. I think my books covered PMPs a little too (free now here Folder Viewer - Fasetto )
PMPs are really a step backwards from add-in's though, there is nothing you cannot do with an add-in. Perhaps instead of spending time on PMP, I make a video showing how to easily mimic the entire PMP behaviour in an add-in?
-
Re: Video Tutorials - What would you like?
Adam Hoffman Nov 21, 2016 11:48 AM (in response to Luke Malpass)Sounds good. I usually design my own forms for us to interact with, I was just curious about integrating it into a few of the add ins I've written.
-
-
Re: Video Tutorials - What would you like?
Daen Hendrickson Nov 21, 2016 11:23 AM (in response to Adam Hoffman)Adam Hoffman beat me to it... Property Tab would be great.
My ideal goal would be to create my own version of the Property Tab in the task pain that had capability above and beyond the SW version. I have several Top 10 entries addressing this topic.
A brief listing:
- Consistent navigation among elements of every type
- BUTTON to enter today's date
- Linked elements - enter specific data in this one and corresponding data automatically fills in the other one(s)
- Ability to add NON-material database items to Material such as N/A, None
- Ability to "pause" or suppress data updates but still have tab visible
- Currently if the tab is left open SW performance is hugely bogged down if you are switching between between files as the Property tab is constantly trying to update.
- Tool Tips for elements (text and graphics)
Daen
-
Re: Video Tutorials - What would you like?
Luke Malpass Nov 21, 2016 1:59 PM (in response to Daen Hendrickson)Yep all of the above is possible and much easier in an add-in. I think I will make a video around the PMP style add-in.
It will likely use WPF so styling is easy, modern and super clean. This will be a good few videos ahead though as I have to cover lots of the basics first
-
Re: Video Tutorials - What would you like?
John Stoltzfus Nov 21, 2016 3:06 PM (in response to Luke Malpass)When I saw the name I was like "Hey", Luke's back, awesome, loved your insight over the years. Elementary User Forms would be my interest, not sure if it would be better or quicker than CPTB though...
-
-
-
Re: Video Tutorials - What would you like?
Bernie Daraz Nov 21, 2016 4:36 PM (in response to Luke Malpass)Luke,
That sounds great! You have already helped me in the past. But please, what is your YouTube channel ID?
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 23, 2016 6:46 AM (in response to Bernie Daraz)Old one was angelsixtube, new one is here AngelSix - YouTube https://www.youtube.com/channel/UCJ3AxeCHGPZkMi3kRfCuiHw
I will get a new youtube short URL after 30 days once the new channel has been open long enough
-
Re: Video Tutorials - What would you like?
Bernie Daraz Nov 21, 2016 4:44 PM (in response to Luke Malpass)Subscribed and Thanks!
-
-
-
Re: Video Tutorials - What would you like?
Nilesh Patel Nov 22, 2016 2:29 AM (in response to Luke Malpass)Hi Luke,
Great idea. Why not start with SolidWorks SDK template itself? I mean:
1. Explaining how DLL is registered.
2. Creating Command Manger and Command Group.
3. Addition to Menu Bar.
4. Adding Add-in buttons and flyout group.
5. Adding custom bitmap images for add-in buttons.
6. Embedding resources and finally,
7. Set up and Deployment of the add-in.
These are the basic stuffs need to be learned for any beginner to start writing an add-in. Once they understand these points it will be lot more easier for them.
Regards,
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 5, 2016 4:54 PM (in response to Luke Malpass)Ok guys I started doing a remastered blank add-in ready for the first video. I then got to the stage of registering the Dll, and I know all the issue so many people have with doing that, between 32bit/64bit, regasm location, command, running as admin and so on.
So, I made a visual tool to do it for you, simply open it, browse to your dll and click Install or Uninstall to register and unregister any SolidWorks Add-in dll.
I've open-sourced the entire code as well, which is well documented if anyone wants it (all my code going forward is 100% open source)
Find the compiled tool here if you just want to run it and try it out Folder Viewer - Fasetto
Find the source code here GitHub - angelsix/solidworks-api: C# SolidWorks API stuff in the Tools folder
Let me know what you guys think. I will be making the first video soon, and the registering part can now easily be done by this tool, so I will focus on creating the basic blank add-in C# project and getting it opening in SolidWorks ready for creating some UI and doing some of the requested API code. I'll post this tool in a seperate thread too as it will be handy to a lot of people
-
Re: Video Tutorials - What would you like?
Jaja Jojo Dec 6, 2016 3:01 AM (in response to Luke Malpass)thanks
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 6, 2016 5:18 AM (in response to Luke Malpass)The first video is live. Let me know what you think, more to follow soon
C# SolidWorks API Tutorial - 01 Getting Started Creating Taskpane - YouTube
-
Re: Video Tutorials - What would you like?
Jaja Jojo Dec 6, 2016 11:46 AM (in response to Luke Malpass)i really like it, it helps me as im starting to learning programming language
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 11:51 AM (in response to Luke Malpass)I've started creating the SDK I wanted to create years and years ago, making the SolidWorks API really easy and work right.
I've called it SolidDNA, its free, open source and you can do what you like with it.
I've made a video showing off compared to the first video now how easy it is to create an SolidWorks Add-in with a Taskpane and a WPF UI embedded in it.
C# SolidWorks API Tutorial - 02 SolidDNA Creating Taskpane and WPF - YouTube
Next video will start doing some actual API stuff like messing with the opened files, custom properties, UI and more
Remember if you like the video, please like and subscribe it and many more will come!
-
Re: Video Tutorials - What would you like?
Deepak Gupta Dec 14, 2016 12:13 PM (in response to Luke Malpass)Great Luke, keep them coming
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 4:25 PM (in response to Luke Malpass)I've started creating the SDK I wanted to create years and years ago, making the SolidWorks API really easy and work right.
uff...I have some questions what about:
- safe recals for events, delegates. Unsubscribe on dispose.
- safe cast objects to ObjectModel of API. Like GetBodies => Body[]
- some oblects (maybe singletones) to pass objects between panels, user selections and EventHandlers
- user privileges when work with files (mmm...saveAs to "C:\" , save any files to "application data")
- fully worked on COM errors . Like RPC_DISCONNECT or SERVER_FAULT
- in-process, out-of-process getters
- obsolette methods but really needed in code. swModel.Save()
- using multithreading (Action, Thread, BackgroundWorker ) to ... mmm ... traverce
...
Or it will be just some tool library with snippets: methods and classes?
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 4:37 PM (in response to Oleg Bezyaev)All that will be addressed in the SolidDNA. It will monitor and take care of COM objects, dispose correctly, catch specific expected errors like RPC_DISCONNECT and so on.
That's the whole point of it. To take COM API and turn it into C# with all the benefits of not having to worry about pointers, Coms, invalid pointers and so on.
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 4:41 PM (in response to Luke Malpass)Maybe some NuGet to test?
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 4:49 PM (in response to Luke Malpass)Hmm ... "PlugInIntegration". Dynamicaly load? What about debug NonUserCode in this case? What about connect to same events and lock threads?
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 4:57 PM (in response to Oleg Bezyaev)Thread locks won't happen as the core SolidDNA controls the invocations so will protect against them.
Its also designed that SolidDNA will provide all the needed functions to do what you want so the user just needs to make sure they write their code thread safe
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 5:03 PM (in response to Luke Malpass)write their code thread safe
SolidDNA - all written in C# or it's just another wrapper for native libs?
I am confused by your full confidence in the correctness of threading, sorry
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 5:07 PM (in response to Oleg Bezyaev)Ha don't worry I've been programming since 10. I run 3 software companies one hosted by Samsung at CES this year and threading is not even an issue. This stuff is insanely simple compared to what I do on a daily basis
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 5:11 PM (in response to Luke Malpass)Microsoft ActiveX - it's hell. For all programmers.
And nobody is insured from errors in the next update of windows bugs themselves or SW.
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 5:14 PM (in response to Oleg Bezyaev)That's true for any software. Put it this way at wrote BatchProcess over 5 years ago. It's never had a single code update and works flawlessly today
You are happy to take, use and improve the SDK if you feel it has issues anyway. That's the point of it being open source
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 5:18 PM (in response to Luke Malpass)That's the point of it being open source
Well, let's get started to commit? ))))
-
Re: Video Tutorials - What would you like?
John McCall Dec 21, 2016 6:59 PM (in response to Luke Malpass)Hello all,
I can vouch on batchprocess2!!been using for over 5 years and it a great software as a user propective!!☺
-
-
-
-
-
-
-
-
-
Re: Video Tutorials - What would you like?
Nilesh Patel Dec 15, 2016 6:35 AM (in response to Luke Malpass)Great stuff!
-
-
Re: Video Tutorials - What would you like?
Daen Hendrickson Dec 14, 2016 12:06 PM (in response to Luke Malpass)Luke,
A little off topic, but watched your video on the rapid fire mod to the game controller. Your solder-in overlay is REALLY a slick approach!
Daen
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 3:57 PM (in response to Luke Malpass)I plan to create a C# open-source API for the crappy SolidWorks interop dll's that wraps them up and makes them work as expected, easy to use and fully documented with video tutorials of them.
What exactly wrong with current API?
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 4:38 PM (in response to Oleg Bezyaev)@Oleg Bezyaev post above highlights all the issues
-
-
Re: Video Tutorials - What would you like?
Ryan Navarro Dec 14, 2016 5:25 PM (in response to Luke Malpass)Not sure if it's too far out there but I would like to see the process for interfacing with a relational database such as SQL
Whether that is a standalone C# tutorial, or coupled with SOLIDWORKS.
End goal being something as simple as reading a dimension or property from SOLIDWORKS, and writing it to a particular cell in the DB. And then querying something from the DB, and write back to SOLIDWORKS.
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 14, 2016 5:30 PM (in response to Ryan Navarro)Simple enough. I'll use EntityFramework. No need to manually write SQL code EntityFramework will make it nice and simple
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 14, 2016 5:40 PM (in response to Luke Malpass)I've been programming since 10
Simple enough.
Of course it will be simple, but not for all
Add more about the connection string, LINQ competent, a different level of abstraction and good displaying result. This is not one-hours video
-
-
-
Re: Video Tutorials - What would you like?
Babak Shei Dec 14, 2016 5:27 PM (in response to Luke Malpass)Start from basics please on API.
-
Re: Video Tutorials - What would you like?
Timothy Root Dec 15, 2016 1:08 PM (in response to Luke Malpass)Luke,
Have you looked at this framework? GitHub - Weingartner/SolidworksAddinFramework
It's got a very slick way of performing automated unit tests inside SolidWorks. There are also a few functions I find very useful. I've learned a lot about functional programming and extension methods by reading through the code but am not convinced this is the best approach for a framework for the general audience. I thought I would mention it in case you could borrow some ideas for SolidDNA
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 15, 2016 1:14 PM (in response to Timothy Root)Took a quick look. Doesn't really look related to what I will be creating. Thanks for the link though
-
Re: Video Tutorials - What would you like?
Oleg Bezyaev Dec 15, 2016 3:19 PM (in response to Timothy Root)Little no good.
WPF in code-behind
-
-
Re: Video Tutorials - What would you like?
John McCall Dec 24, 2016 2:37 PM (in response to Luke Malpass)Hello all,
My requests is based on what i think might be useful to many users and couple for myself but hope all they get in a video at some point!!
*add read only and write access fields in taskpane link to users custom properties ..
*Drop down menus that can have a couple of options and save to a custom property field.
*Add buttons for saving PDF and DXF . Or both at same time.( edited 24/12/16)
I wanted to expand on this point.. i know alot of engineers encluded myself get requests to package an assembly to be sent to a outside company to be welded.. usually this takes a bit of time as you have to both print DXF &PDF of the drawings and create a BOM showing qauntities . Is it possible to have a button "sub-contract" thats create a folder structure .
A. kits every DXF flat pattern (removes title block,text etc ) and place in folder based on material size.
B. A folder call PDF.
C. A Folder for report export a number of reports.
- plasma/laser report
- cutting report
- full BOM report.
The report would consist of the user custom properties field..
Iknow there is all different macros that does bits above . But to combine them would save time and confusion and you missing parts... This would mean the engineer would get to do want they enjoy more(design). Rather admin...
*Button( user new icon) to link to personal marcos..outside of taskpane ?(is that possible?). Ie centre of gravity macro.
* green/red button indicator if part or assembly is fully defined( check for minus in part features or assemblies) This one is more for myself . The Purpose to have a quick visual check that part/ assemby good.
* quick print button that prints drawings of open assemblies or parts or both in order of the tree. ( perhaps too close to Batchprocess2 this feature... )
Thanks Luke
Is there anyone else out there if these features would help?
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 23, 2016 6:42 AM (in response to John McCall)Most of the above will be covered in the next video coming up in a day or so
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 23, 2016 6:41 AM (in response to Luke Malpass)I've just added a video on creating a WPF UI. This will be used in the next SolidWorks video coming in a few days, manipulating custom properties.
Also, I'm changing my YouTube channel (old one is linked to old businesses, lots of old subscribers that are from gaming community and so on) so no new videos will appear on that channel. Anyone wanting to stay updated with the new videos, please subscribe to my new channel below (sorry about the long URL that will be fixed in 30 days when I can create a custom short youtube URL).
I'll get onto doing the requests above after this custom properties video. It's taken a while as now a lot of the framework of the SolidDNA API has been done (dependency injection, localization, IoC, exception handling etc...), but new tutorials will come faster
-
Re: Video Tutorials - What would you like?
Deepak Gupta Dec 23, 2016 7:23 AM (in response to Luke Malpass)Luke Malpass wrote:
Anyone wanting to stay updated with the new videos, please subscribe to my new channel below
Just did it
-
Re: Video Tutorials - What would you like?
Nilesh Patel Dec 23, 2016 8:44 PM (in response to Luke Malpass)Subscribed..!
-
-
Re: Video Tutorials - What would you like?
Andrej Lazikov Dec 26, 2016 6:36 AM (in response to Luke Malpass)good afternoon
interested examples
1. The shape, the read data from the model (size, weight, volume)
2. Storing data file property from the mold being computed according to the formulas or the table based on the size, weight, volume model
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 27, 2016 6:26 PM (in response to Andrej Lazikov)The latest video on my YouTube can now get the weight and volume, I can add size in another video.
For storing data, would storing this information in a database (via Entity Framework) cover this requirement? If so, this will be done in a video shortly too
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 27, 2016 6:16 PM (in response to Luke Malpass)The next video is out
C# SolidWorks API Tutorial - 03 SolidDNA Custom Properties, Materials, Mass - YouTube
This is the first major step forward in SolidDNA. There has been a lot of framework setup, logging, error handling, localization, file management, threading, async, dependecy injection and more.
There is now also the ability to monitor the active file, file save activity, editing and creating/deleting custom properties.
You can easily read the mass properties.
Also there is a major lack of support in the SolidWorks API for working with materials, both for getting them, setting them, reading them etc... in SolidDNA you can now get all materials available for the entire SolidWorks, with all properties via just
Dna.Application.GetMaterials()
You can set them just the same with
model.SetMaterial(material)
Check out the video for more info or the source code here
The next video I'll pick one of the requests in this thread and do that.
Also please remember to like the video and subscribe if you find these useful. The videos take time and I want to make sure they are useful so liking the videos will make sure more come
-
Re: Video Tutorials - What would you like?
Nilesh Patel Dec 29, 2016 6:24 AM (in response to Luke Malpass)Hi Luke,
Thanks for another great video. I have downloaded SolidDNA so will give it a try soon.
I have asked a question sometime ago in SolidWorks API forum: How to add add-in button to existing command bar tab?
I have not received any satisfactory answer yet and am not sure whether this is even possible. I am sure you will be able to provide some light in this matter.
Regards,
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 29, 2016 6:40 AM (in response to Nilesh Patel)Sure thats simple enough. I'll have a play with the command manager in a few more videos, but to get you started, if I could not find a way to create a single command tab for 2 add-ins, I would simply use WCF so that the two add-ins can communicate with each other. Then each would try and find the other. If not found, they just create a command tab. However if they find each other, then decide who takes authority and creates the tab, then the other becomes a slave and tells it what tabs to create, and what functions to call on clicking.
Also, you might want to look at if you want/need 2 seperate add-ins. What is the reasoning behind that decision in the first place? If you just want to keep code seperate in different dll's, like SolidDNA (take a look at the github source) you could have a master add-in, that loads plug-ins (other dlls) that would then be part of the add-in and can simply be pasted into the same directory as the master add-in to get loaded as plug-ins without recompiling the add-in.
-
Re: Video Tutorials - What would you like?
Nilesh Patel Dec 30, 2016 12:51 AM (in response to Luke Malpass)Hi Luke,
Thanks for the quick reply. I have some knowledge about C# and VBA but I am not an expert programmer, so using WCF would be difficult for me. I would probably wait for your tutorial instead.
The main reason to create 2 separate add-ins is that in future, if you decide not to use one add-in (for whatever reason), you can simply uninstall that particular add-in without affecting the other. This is not a real life situation, I just wanted to know whether it can be done or not and if yes, how.
Regards,
-
-
-
Re: Video Tutorials - What would you like?
Nilesh Patel Jan 1, 2017 9:29 PM (in response to Luke Malpass)Hi Luke,
How can you change Task Pane UI to work with multi configuration part (specially part number and description)? We use lot of multi configuration parts and sometimes one part ends up with 10 to 15 configurations.
Regards,
-
Re: Video Tutorials - What would you like?
Luke Malpass Jan 3, 2017 6:45 AM (in response to Nilesh Patel)There are many ways. The simplest is I would add a dropdown (combobox) at the top. That by default is nothing, (so manually add the first item to the list saying "Default" that if selected is the custom properties. Then get all the configuration names from the model on active model changed and add those to the combobox.
On the selection changed of the combobox call ReloadDetails to refresh all the details, and when the call to GetCustomProperties or SetCustomProperties is called, pass in the selected configuration name as they accept the configuration name as an option.
So then whenever you select a new configuration from the dropdown the UI updates to show the configuration specific properties, and also sets them
-
-
-
Re: Video Tutorials - What would you like?
John McCall Dec 28, 2016 8:11 AM (in response to Luke Malpass)Thanks Luke for new video. We all starting to see how much fun you can have with your help!
-
Re: Video Tutorials - What would you like?
Luke Malpass Dec 31, 2016 1:47 PM (in response to Luke Malpass)Next video is out. Shows how to easily access selected objects, and check if they are features, dimensions or other.
Then really easily get the specific selected object, in this example a dimension.
C# SolidWorks API Tutorial - 04 SolidDNA Selected Objects & Dimensions - YouTube
Next video will be exporting parts, assemblies and models in various formats
Let me know what you think
-
Re: Video Tutorials - What would you like?
Sebastien Kitten Jan 5, 2017 3:35 AM (in response to Luke Malpass)Hello Luke,
as requested, here are some ideas of useful API for me ( and I guess for some other SW users):
- a small function useful for sheet metal parts drawings : hide all the sketches of one part but those used for flat patterns.
- rename all the sketches in one part, using the feature name with a prefix or suffix (cut-extrude 1 -> sk_cut-extrude 1). Useful when I want to configure the state of several features (that I rename to improve the readability) and associated sketches.
- automatic update of the family table based on an external Excel spreadsheet on several parts included in an assembly in one clic. Small warning: it seems that sometimes, the family table doesn't update even in the edit mode, I have to edit and validate the command line itself (='[my_excel_filepath]\excel_2_SW.xlsm]SW_datas'!E5 for example) to have the new value updated.
- export preparation of a whole assembly that would first delete all the unused features included in each part, then delete all the unused configurations , then convert the family tables into configurations and finally save the new light assembly with all its light parts under a new name , to keep the original files safe.
I haven't found these API for the moment, but maybe I just missed them. If so, my apologies.
One final note : for API beginners, I find VBA easier to understand than C#, but I'm gonna watch and try to understand your youtube courses.
I wish these ideas will inspire you, I go and subscribe to your channel right now to see if they do ...
Regards.
Sebastien.
PS : sorry if I don't use the correct naming, I use the french version of SW
-
Re: Video Tutorials - What would you like?
Luke Malpass Jan 5, 2017 8:07 PM (in response to Sebastien Kitten)Sure I'll look into doing videos on the above requests when I get the time shortly.
For C# I've done videos on that too on my YouTube channel. It's easy to learn with a little bit of time
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Jan 12, 2017 6:45 PM (in response to Luke Malpass)A short video aimed at supporting editing of Add-In code in Visual Studio live without reloading SolidWorks. It appears there was quite a demand for it on the forum so I did that first
Next up, an Add-In with some exporting (dxf, sheets, 3D, pdf etc...) buttons that I will add to the command manager
-
Re: Video Tutorials - What would you like?
John McCall Jan 16, 2017 7:47 AM (in response to Luke Malpass)Thats great! All engineers use DXF,PDF printing! Is it possible to batch print like explained on the "sub contract" request I made earlier(posted 24-Dec)
WOULD ANYONE ELSE FIND THIS USEFUL??
-
Re: Video Tutorials - What would you like?
Rick McDonald Jan 16, 2017 10:10 AM (in response to John McCall)I would find that very useful,
When we get an order I have to individually open, select print, Confirm print options, close, (are you sure?)Y - for each file.
Very time consuming and tedious.
-
-
-
Re: Video Tutorials - What would you like?
Tom Helsley Jan 12, 2017 8:05 PM (in response to Luke Malpass)A really cool tool would be one that repairs broken in-context references of renamed assemblies. This is the scenario I come across periodically:
- I create a new concept model with in-context references. The part files with in-context references are all virtual components.
- For the second concept iteration, I save the assembly to a new filename - but the in-context references all break. So, Now I must go through all of the sketches and features with in-context references and 'repair' them under the new assembly filename.
A macro/addin to do this automatically would be awesome! What do you think? Can you do a video on how to manipulate the in-context references?
-
Re: Video Tutorials - What would you like?
Sebastien Kitten Jan 13, 2017 4:22 AM (in response to Tom Helsley)Hi Tom,
I often had this kind of problem also. If the API that could be useful for this operation is too long to arrive for you, I can only advise to have a look on Solidworks Explorer. SW Explorer can modify these references in a way that SW itself doesn't allow. This software saved my time since I discovered its abilities. I really don't understand why these functions aren't included in SW directly using an option.
Regards.
-
Re: Video Tutorials - What would you like?
Luke Malpass Jan 13, 2017 6:09 AM (in response to Tom Helsley)It will go on my list for a future video. Can you provide an example assembly pre-broke then a quick step by step to make sure I get exactly what you need covered in the video
-
Re: Video Tutorials - What would you like?
Tom Helsley Jan 14, 2017 1:59 AM (in response to Luke Malpass)I sure can.
-
Re: Video Tutorials - What would you like?
Tom Helsley Jan 18, 2017 1:58 PM (in response to Luke Malpass)Hey, Luke. Here is a sample of an in-context assembly with virtual components inside it. Almost all of the in-context references are already broken.
Steps in video(s):
- Show how to list current in-context references through the API
- Show how to replace in-context references via the API:
- Selectively (i.e. for each feature of each part in the assembly)
- All (i.e. stepping through FM of all components in the assembly)
It might be best to break the video into multiple - maybe one video per line above.
-
In-Context Sample.SLDASM.zip 245.3 KB
-
Re: Video Tutorials - What would you like?
Luke Malpass Jan 19, 2017 4:09 AM (in response to Tom Helsley)So you created that assembly, then simply renamed it to break the in-context?
How do you "repair" it afterwards?
-
Re: Video Tutorials - What would you like?
Tom Helsley Jan 19, 2017 12:31 PM (in response to Luke Malpass)Yep, I renamed it in Windows. Normally, I repair the broken references in the new assembly by editing each sketch and feature with in-context references ( indicated by "->?" in the feature manager).
The referenced geometry IDs didn't change, just the assembly that they are in, so I would think something in the API should be able to replace the old assembly name with the new assembly name in the reference.
-
-
-
Re: Video Tutorials - What would you like?
John Stoltzfus Jan 13, 2017 7:35 AM (in response to Tom Helsley)Tom Helsley - that would be an awesome macro, that is something I battled with for many years as well, till I got the hang of Pack & Go, basically knowing what needs to be packed or not.
Here when I do a new design there are almost always three sizes in tables or benches, but 5 sizes in beds etc.. so I always start with the one size and do the complete assembly model, then the piece goes through an approval process before I pull it into the drawings.
Only after all the parts for that assembly are in the drawing and dimensioned is when I do the pack & go. I use the Search/Replace button to change the part and assembly numbers for the next size and also check the box where it asks to include the drawings, also un-check any purchased item, I want pull them from the original source or folder and not have multiple copies of the same part. I have a Pack & Go folder on my desktop and I save them there zipped, then I close the initial assembly and unzip the folder and open the main assembly and change my Master Sketch dimensions for the new size.
So now there are parts that didn't physically change, such as a Foot, here we don't want two part drawings with identical components with the same name, but different part numbers, so that part becomes an interchangeable component (not purchased parts, screws, hinges etc). Here is the catch and something I screwed up for years, I would delete the new Foot and insert the Foot from the first model, this works so, ok, but now I just leave those parts in and check the properties to not include them in a BOM, put them in a folder in the feature tree and leave them there, then I drop the original Foot into the assembly and mate it to the New Packed Foot in the Folder... This may sound like a lot of to do, but all of my models are parametric and easy to change for sizes etc and I want to change my Master Sketch so that everything moves as it should and I also need to have the right info in the BOM and only the right amount of drawings... So the original drawing may have 50 pages while the other sizes only have 15 etc...
If I need to modify an original component doing it this way forces me to open the original assembly file or one of the sub- assemblies and make the proper changes to the part there, that is the only way that I found to work around the missing relations and sketch errors etc... Granted that when you try to make changes to the original Foot when you're in a packed assembly it will prompt you that the item is in context and it will list the original assembly it was inserted, now I don't want SW to change that function, I think if used properly it will eliminate a lot of issues, if someone arbitrarily opens an assembly and make changes without knowing what it really is effecting....
Have fun and enjoy Friday the 13th
-
Re: Video Tutorials - What would you like?
Sanya Shmidt Jan 13, 2017 12:36 PM (in response to Luke Malpass)Hello Luke!
Would be nice to discover EPDM side as well, such as checking if files exist, checking in/out, getting latest version etc...
Alex.
-
Re: Video Tutorials - What would you like?
Tom Helsley Jan 14, 2017 1:58 AM (in response to Sanya Shmidt)I'll second that, Sanya Shmidt. I've been spending a lot of time in PDM, looking for better ways to do stuff. The EPDM API (addins) is confusing to me. How do I create and addin, debug it, and package and install it? The documentation describes it, but it still isn't clear. Also, the documenation doesn't say what software is needed. Can I use an Express version of Visual Studio, etc.?
Thanks,
Tom
-
Re: Video Tutorials - What would you like?
Daen Hendrickson Jan 16, 2017 12:14 PM (in response to Sanya Shmidt)I would like to see any API manipulation methods that can be applied to PDM Standard. Yes, I understand it does not have a provided API interface.
Daen
-
-
Re: Video Tutorials - What would you like?
Luke Malpass Feb 18, 2017 4:24 AM (in response to Luke Malpass)Sorry for the lack of videos this month. I had a lot of business to catch up on, deadlines to hit, and a huge influx of people wanting WPF videos. I'm away next week, so going to try and do the exporting DXF/STEP/Iges project today/tomorrow and post the video. Then I'll do the shared command bar thing everyone keeps asking about.
-
Re: Video Tutorials - What would you like?
Luke Malpass Mar 12, 2017 5:45 AM (in response to Luke Malpass)Sorry it took so long to get this video out. Between a holiday, getting the flu, and huge demand for WPF videos, then the command manager being a lot more work then needs be to create items this one took a while.
Next video is up. You can now create command manager menus, toolbars and tabs in 1 line of code in SolidDna.
C# SolidWorks API Tutorial - 06 SolidDNA Command Manager Groups Tabs & Exporting Files - YouTube
I combined that with showing how to do some file exporting of DXF flat patterns, drawings as PDFs and assemblys and parts as STEP. Exporting as other formats is trivial so I left that.
I am making a tool to create icon strips from single icons shortly, that can then be added and used directly in SolidWorks. I'll post here when thats done in a few days.
So what's next? Is the in-context fix-references issue the next most popular thing to do? Where do you guys want SolidDNA to get some work focused on next?
-
Re: Video Tutorials - What would you like?
Peter Brinkhuis Mar 12, 2017 4:09 PM (in response to Luke Malpass)Your commits are huge, awesome. I'll check out the new video tomorrow.
I'm working on drawings now. Since SolidDNA doesn't have a lot of drawing functionality yet, I'm finding myself going around the wrapper most of the time. The functionality that is there results in way less code compared to using the API, so I'd like to use it more. Could you show either:
- How to Use the unsafeObject so I can access all Solidworks API calls without going around SolidDNA
- Where to add drawing functionality. I wouldn't know where to start, that's why my pull requests were so small.
I saw your note about there not being an event that all files are closed. I'm using ActiveModelInformationChanged to check if the model changed to change the contents of the task pane. When you close the last part, the event is fired and the model returns null. When you close the last drawing though, the event doesn't get fired. Is this expected behavior or not?
-
Re: Video Tutorials - What would you like?
Luke Malpass Mar 12, 2017 4:20 PM (in response to Peter Brinkhuis)Sure, for UnsafeObject simply get the closest you can get to your object with the SolidDNA classes, and once that class doesn't contain the function you need, do .UnsafeObject to access the underlying API, then just work from there down.
For example if we didn't even have a way to get the active model, you would do Dna.Application.UnsafeObject.ActiveDoc for example.
For adding drawing support, show me some basic standard API calls to do something and I can guide you as where to start in adding SolidDNA classes (probably easily to just email me on that, my email is on angelsix.com )
For the last drawing closing not firing an event, not that isn't expected. Add a breakpoint in SolidWorksApplication.cs line 316 (ActiveModel_Closing). See if that get's hit when you close the last drawing. Send your findings to my email again so this thread doesn't turn into a coding thread ha.
-