Hi @Slasher
Here you go..
https://github.com/Jack-Badger/SWMacros ... nfigs1.bas
Probably easiest to create your own new macro and paste in the code ignoring the first line.
Its a rough and ready macro written in a hurry but it has served me well.
Search found 128 matches
- Wed May 08, 2024 2:46 pm
- Forum: Macro Library
- Topic: Pull Component Configs to Assembly
- Replies: 3
- Views: 2635
- Mon Apr 22, 2024 5:06 am
- Forum: SW General
- Topic: Standard Parts Library: Configurations or Individual Parts?
- Replies: 42
- Views: 11542
Re: Standard Parts Library: Configurations or Individual Parts?
For what its worth I create a master file with configurations, but then I have a macro that rips out the individual parts.
Best of both worlds perhaps.
Best of both worlds perhaps.
- Sun Nov 12, 2023 11:10 am
- Forum: How To Questions
- Topic: Dirty Files and what causes them.
- Replies: 56
- Views: 19951
Re: Dirty Files and what causes them.
hi ryan did you see alins post? In versions prior to 2020 displaying multiple configs in an assembly will cause the file to be dirty. Adding a save on rebuild mark will ensure every config is rebuilt on save. For files with external references make you sure to follow the best practise as shown in th...
- Tue Sep 05, 2023 12:58 pm
- Forum: Macro Library
- Topic: Solidworks Sketch > Custom GTOL Symbol Convertor
- Replies: 10
- Views: 5046
Re: Solidworks Sketch > Custom GTOL Symbol Convertor
Oh here's an example file I had.. so I include the macro as well
- Tue Sep 05, 2023 12:53 pm
- Forum: Macro Library
- Topic: Solidworks Sketch > Custom GTOL Symbol Convertor
- Replies: 10
- Views: 5046
Re: Solidworks Sketch > Custom GTOL Symbol Convertor
Hi Guys Sorry just seen this. It was a long long time ago I wrote this.. believe it or not my first solution involved saving as as iges and I had an excel spreadsheet that parsed it and outputted the code. This was one of the first projects I did when learning the api and VBA. I daren't even look at...
- Fri Jun 30, 2023 12:19 pm
- Forum: How To Questions
- Topic: How to Turn Off Floor Reflections and Shadows by DEFAULT?
- Replies: 11
- Views: 12567
Re: How to Turn Off Floor Reflections and Shadows by DEFAULT?
So I just opened up an old part and was cursed with the reappearing floor reflection bug again which led me here. Anyway I found the answer on reddit https://www.reddit.com/r/SolidWorks/comments/v9db67/how_to_disable_floor_reflections_by_default/ The trick is to turn off reflections/shadows with a R...
- Mon Jun 19, 2023 12:57 pm
- Forum: SW General
- Topic: External Reference To Self!
- Replies: 4
- Views: 953
Re: External Reference To Self!
So its works a treat
after ripping the configs and replacing components the features are still in context.
The features that are suppressed go out of context which makes sense but I could add a delete suppressed features option to my ripper.
Happy Days
after ripping the configs and replacing components the features are still in context.
The features that are suppressed go out of context which makes sense but I could add a delete suppressed features option to my ripper.
Happy Days
- Mon Jun 19, 2023 12:43 pm
- Forum: SW General
- Topic: External Reference To Self!
- Replies: 4
- Views: 953
Re: External Reference To Self!
pretty cool
- Mon Jun 19, 2023 12:38 pm
- Forum: SW General
- Topic: External Reference To Self!
- Replies: 4
- Views: 953
Re: External Reference To Self!
Hey Fred
Nah everythings in context
doesnt appear to be causing any probs yet
I'm going to see what happens when I pack and Go
also see if I can rip the configs and replace components keeping the refs
Nah everythings in context
doesnt appear to be causing any probs yet
I'm going to see what happens when I pack and Go
also see if I can rip the configs and replace components keeping the refs
- Mon Jun 19, 2023 9:51 am
- Forum: SW General
- Topic: External Reference To Self!
- Replies: 4
- Views: 953
External Reference To Self!
This is so crazy I had to share image.png As I always understood it was impossible to create an external reference from one configuration to another... but I must be tripping because you can. I have a workflow where I use configurations to create my components, but I rip them out into individual fil...
- Fri Jun 16, 2023 8:04 am
- Forum: How To Questions
- Topic: sketch dimensions and configurations
- Replies: 20
- Views: 4056
Re: sketch dimensions and configurations
We do this kind of thing quite a bit. What we do is have some unconfigured global variables. These will be the same value for All Configs and you can edit them whilst in any configuration. We then use configured equations for the dimensions. An example should make it clear image.png image.png I woul...
- Thu Feb 16, 2023 2:47 am
- Forum: Macro Library
- Topic: Macro community on Github
- Replies: 1
- Views: 1557
Re: Macro community on Github
Hi andrmollo I'm always interested in macros and the api and would love to see your contributions. For what it's worth I have some macros on github . The quality is variable as some of them are quite old. They are also quite poorly documented because when I'm writing I'm generally in 'get her done' ...
- Wed Apr 06, 2022 4:42 am
- Forum: How To Questions
- Topic: SKETCH PATTERN OF BODIES IN A WELDMENT
- Replies: 7
- Views: 1720
Re: SKETCH PATTERN OF BODIES IN A WELDMENT
You can use a circle for the first point as doesn't add instance for a center point. This is a tip from old forum, maybe Dan p's?
- Fri Mar 11, 2022 5:33 pm
- Forum: Kitty Dump
- Topic: What do you listen to at work?
- Replies: 464
- Views: 221385
- Fri Mar 11, 2022 4:29 am
- Forum: Kitty Dump
- Topic: What do you listen to at work?
- Replies: 464
- Views: 221385
- Fri Jan 21, 2022 8:17 am
- Forum: How To Questions
- Topic: Dirty Files and what causes them.
- Replies: 56
- Views: 19951
Re: Dirty Files and what causes them.
Rob I'd like to understand more about configurations and dirty files. I find any model file with more than one configuration is automatically dirty whatever I do. I have "rebuild all configurations on save" turned on, even. I just live with it, but I don't like it. You really had to do a ...
- Thu Jan 06, 2022 5:15 am
- Forum: SW General
- Topic: SSP in the assembly or inserted into each part of the assembly?
- Replies: 21
- Views: 3784
Re: SSP in the assembly or inserted into each part of the assembly?
I haven't read the whole story sorry but yep I'm a woodworker. I've tried about every way I can think of but am of the conclusion that any serious solution requires api support. What I've often done is to create a skeleton part or parts and have them as an envelope in every relevant assembly. I tend...
- Tue Dec 21, 2021 9:59 am
- Forum: API
- Topic: Determine if a drawing dimension is an inserted model item
- Replies: 9
- Views: 2262
Re: Determine if a drawing dimension is an inserted model item
The object chain for dimensions is long and convoluted. It could be any one of a number of objects. Keep sifting and probing. Cheers I ended up just brute forcing it, grabbing the referenced document pathname, along with the referenced configuration, feature name and dimension name and put them in ...
- Sun Dec 19, 2021 2:51 am
- Forum: API
- Topic: Determine if a drawing dimension is an inserted model item
- Replies: 9
- Views: 2262
Re: Determine if a drawing dimension is an inserted model item
Maybe check http://help.solidworks.com/2015/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IDisplayDimension~MarkedForDrawing.html as well? Edit: How do I edit the hyperlink display text? Edit2: I just tried, and it doesn't show the inserted dimension as "Marke...
- Fri Dec 17, 2021 11:16 am
- Forum: API
- Topic: Determine if a drawing dimension is an inserted model item
- Replies: 9
- Views: 2262
- Fri Dec 17, 2021 10:08 am
- Forum: API
- Topic: Determine if a drawing dimension is an inserted model item
- Replies: 9
- Views: 2262
Re: Determine if a drawing dimension is an inserted model item
fraid notmattpeneguy wrote: ↑Fri Dec 17, 2021 9:08 am Is this what you are looking for?
http://help.solidworks.com/2018/english ... state.html
- Fri Dec 17, 2021 8:53 am
- Forum: API
- Topic: Determine if a drawing dimension is an inserted model item
- Replies: 9
- Views: 2262
Determine if a drawing dimension is an inserted model item
Hi guys I'd like to work with the drawing dimensions that have been inserted as Model Items. I've looked through the IAnnotaion , IDisplayDimension & IView interfaces and couldn't see anything that looked right. It looks like I could do this by looking at the Dimension FullName which for inserte...
- Tue Dec 07, 2021 11:49 am
- Forum: API
- Topic: set hole wizard hole size for given configuration scope
- Replies: 9
- Views: 2711
Re: set hole wizard hole size for given configuration scope
Thanks @Austin - it makes me feel very tired when I look on there.Austin Schukar wrote: ↑Tue Dec 07, 2021 11:20 am By the way, @Rob, not to get off-topic, but I checked out the website on your profile. All of the work on there is beyond wonderful. I haven't managed to pick my jaw up from the floor since I opened it.
- Tue Dec 07, 2021 2:46 am
- Forum: API
- Topic: set hole wizard hole size for given configuration scope
- Replies: 9
- Views: 2711
Re: set hole wizard hole size for given configuration scope
I couldn't find anything on this. Hope someone else can help. Maybe @artem or @Rob? Hi Austin I am sorry I am not too familiar with Hole Wizard in general and Hole Wizard API in particular. I noticed what you are trying to do seems possible in a Design Table . If I read your post correctly you coul...
- Mon Nov 29, 2021 6:56 am
- Forum: How To Questions
- Topic: Set import units for DXF as sketch block
- Replies: 1
- Views: 777
Re: Set import units for DXF as sketch block
I tried this with a dxf I exported from SW and it worked, so guess the problem lies with my usage of the netDxf library
- Mon Nov 29, 2021 4:56 am
- Forum: How To Questions
- Topic: Set import units for DXF as sketch block
- Replies: 1
- Views: 777
Set import units for DXF as sketch block
Hi Guys I've been experimenting over the weekend and discovered that you can drag a dxf into a sketch and it becomes a sketch block. Pretty cool stuff, but there is no import options dialog to specify the units and somehow the dimensions are coming in as inches, so my 100mm edge becomes 2540mm. My p...
- Thu Nov 11, 2021 3:02 am
- Forum: SW General
- Topic: Design Table Configuration for Child configs
- Replies: 5
- Views: 1043
Re: Design Table Configuration for Child configs
Hey bdokertur I hate the data validation drop down and generally turn it off image.png To create a derived config in a DT its as simple as putting a config name in the $PARENT column. I believe if you leave a cell blank then it will be Linked to Parent , if you enter a value it is This Config . or a...
- Wed Nov 10, 2021 11:53 am
- Forum: SW General
- Topic: SOLIDWORKS pet peeves
- Replies: 308
- Views: 502288
Re: SOLIDWORKS pet peeves
Why would you use that dialogue box to edit a dimension when if you single click you can enter whatever you want right there? In fact I find it even more annoying there because if you accidentally double click the dim it pulls that dialogue box up and then you have to cancel it to get to the dimens...
- Thu Oct 28, 2021 11:33 am
- Forum: How To Questions
- Topic: Sketch Block Mirrored
- Replies: 12
- Views: 3581
Re: Sketch Block Mirrored
Create a new plane and Flip Normal then insert your block there or Convert Entities from old sketch to a new sketch and recreate the block.
Does that make sense?
I tried it and it seems to work ok
Does that make sense?
I tried it and it seems to work ok
- Thu Oct 28, 2021 11:22 am
- Forum: How To Questions
- Topic: Define Assembly Axis coincident with Center Of Mass
- Replies: 16
- Views: 3422
- Thu Oct 28, 2021 11:19 am
- Forum: How To Questions
- Topic: Define Assembly Axis coincident with Center Of Mass
- Replies: 16
- Views: 3422
- Thu Oct 28, 2021 10:46 am
- Forum: How To Questions
- Topic: Define Assembly Axis coincident with Center Of Mass
- Replies: 16
- Views: 3422
Re: Define Assembly Axis coincident with Center Of Mass
I could be clever and say Catia as this will do exactly what you want :) What you can try is: Create COM Then create 3 global variables which you can assign the values in XYZ of COM (make sure you set to automatically rebuild) Create 3 planes paralel to Front, top, Right and link to the 3 global va...
- Thu Oct 28, 2021 9:28 am
- Forum: How To Questions
- Topic: Define Assembly Axis coincident with Center Of Mass
- Replies: 16
- Views: 3422
Re: Define Assembly Axis coincident with Center Of Mass
I just put a center of mass in an assembly yesterday. I hardly ever use it, but what you are asking should work. Just tried selecting the COM and a sketch point and yep, I can't make a relation. I get it this may be intentional, as I can see some horrible circular reference scenarios, but when's th...
- Thu Oct 28, 2021 8:07 am
- Forum: How To Questions
- Topic: Define Assembly Axis coincident with Center Of Mass
- Replies: 16
- Views: 3422
Define Assembly Axis coincident with Center Of Mass
I'm looking to create a pivot point at exactly the Assembly COM. So far I have achieved this by creating a COM feature in the assembly and then creating an assembly sketch with a single sketch point that I drag coincident to the COM point then using this point and a Plane to define the Axis. This wo...
- Tue Oct 19, 2021 4:36 am
- Forum: How To Questions
- Topic: Sketch text pattern and mirrored text
- Replies: 5
- Views: 1492
Re: Sketch text pattern and mirrored text
Hi Laukejas Glad my idea had some merit.. If the radial position is really important I see no way other than to do the work of additonal ref geom - as you have the skills maybe automated by macro - and individual mates. Here I added a radial plane and another plane normal to it (to avoid mate flippi...
- Mon Oct 18, 2021 5:16 am
- Forum: How To Questions
- Topic: Sketch text pattern and mirrored text
- Replies: 5
- Views: 1492
Re: Sketch text pattern and mirrored text
Hey Laukejas Nice little problem. I would defo be looking at a macro for this but as you don't want one here's a little idea that may reduce the workload but be open to SW quirks image.png Holes via Sketch Pattern - here just some random points Now make your numbers as a configured part using a cust...
- Wed Aug 11, 2021 1:22 pm
- Forum: CAD Agnostic
- Topic: CAD software for equation driven curves
- Replies: 7
- Views: 3270
Re: CAD software for equation driven curves
In SW you could try a Fit Spline?
2018 attached
2018 attached
- Fri Aug 06, 2021 1:57 am
- Forum: SW General
- Topic: Reset Feature name counting number
- Replies: 6
- Views: 1701
Re: Reset Feature name counting number
I agree it can be tiresome, there's a couple of habits you can foster to help but I think you are best not worrying about it too much and/or renaming to meaningful names.
Instead of cancelling, try undo.
If it's a small part you can reload the document quickly.
A macro is probably best solution
Instead of cancelling, try undo.
If it's a small part you can reload the document quickly.
A macro is probably best solution
- Tue Jun 01, 2021 9:05 am
- Forum: CAD Agnostic
- Topic: MoveFace -- To Move or Not to Move
- Replies: 22
- Views: 5456
Re: MoveFace -- To Move or Not to Move
I love MoveFace.. It's principle benefit is that (in a simple offset/rotate) the face id remains the same. Here's a typical use case for me.. I have a nominally sized panel, and use move face to create the fit tolerances. image.png Here I have different tolerances for the width and height - I think ...
- Thu May 13, 2021 1:49 pm
- Forum: API
- Topic: Run Macro Unload After Run
- Replies: 2
- Views: 1241
Re: Run Macro Unload After Run
Thanks for looking @colt@
I was still in the testing stage so my code was almost identical to yours, except it was a msgbox and a rude word ;p
I was still in the testing stage so my code was almost identical to yours, except it was a msgbox and a rude word ;p
- Mon May 10, 2021 6:58 pm
- Forum: What's Wrong?
- Topic: Empty Pages
- Replies: 8
- Views: 2664
Re: Empty Pages
I remember how bad the old forum was on mobile, this ones so slickAlexLachance wrote: ↑Mon May 10, 2021 3:52 pm I noticed you chopped off the phone icons, wasn't judging you Rob
Edit: sorry for taking over your thread with my non-related posts.
- Mon May 10, 2021 6:55 pm
- Forum: What's Wrong?
- Topic: Empty Pages
- Replies: 8
- Views: 2664
- Mon May 10, 2021 3:25 pm
- Forum: What's Wrong?
- Topic: Empty Pages
- Replies: 8
- Views: 2664
- Mon May 10, 2021 5:10 am
- Forum: Catia and 3DX
- Topic: Does anyone actually use 3DExperience in a productive manner?
- Replies: 1291
- Views: 578634
Re: Does anyone actually use 3DExperience?
ƃuılloɹʇ ǝɯos op oʇ pǝʇdɯǝʇ ɯ'ı
- Mon May 10, 2021 4:36 am
- Forum: Catia and 3DX
- Topic: Does anyone actually use 3DExperience in a productive manner?
- Replies: 1291
- Views: 578634
Re: Does anyone actually use 3DExperience?
so I finally logged in because I needed to look at an old answer.
I was surprized that part worked very well.
but then WTAF!
absolute garbage - half the screen was blank and then the posts looked like this.
notifications Loading...
I was surprized that part worked very well.
but then WTAF!
absolute garbage - half the screen was blank and then the posts looked like this.
notifications Loading...
- Mon May 10, 2021 2:13 am
- Forum: What's Wrong?
- Topic: Empty Pages
- Replies: 8
- Views: 2664
Empty Pages
Dunno if it's some setting I have wrong but older posts seem to be empty
As a side note it's sick how I did all this on my mobile.- Sat May 08, 2021 10:07 am
- Forum: API
- Topic: Run Macro Unload After Run
- Replies: 2
- Views: 1241
Run Macro Unload After Run
I'm messing about and have created a macro to run all attached macros. I started with ISldWorks::RunAttachedMacro method The macros run as expected but I noticed that multiple copies of the macro were open in the VBA Editor. I then switched to ISldWorks::RunMacro2 method as I noticed there is the un...
- Sat May 08, 2021 4:33 am
- Forum: SW General
- Topic: Get write access
- Replies: 5
- Views: 2990
Re: Get write access
Hi @Peter De Vlieger
I believe this is where you turn it on/off
I believe this is where you turn it on/off
System Options > Collaboration > Enable multi-user environment > Add shortcut menu items...
- Fri May 07, 2021 10:09 am
- Forum: Macro Library
- Topic: Select Components
- Replies: 5
- Views: 2115
- Fri May 07, 2021 9:36 am
- Forum: Macro Library
- Topic: Select Components
- Replies: 5
- Views: 2115
Re: Select Components
So question: Why do you specifically need to select the component? The reason that I ask, is that normal assembly functions (like copy with mates, copy/paste, change transparency, hide, suppress, etc...) are applied at the component level even though you have selected a face of that part. Mostly fo...