Search found 128 matches

by Rob
Wed May 08, 2024 2:46 pm
Forum: Macro Library
Topic: Pull Component Configs to Assembly
Replies: 3
Views: 2635

Re: Pull Component Configs to Assembly

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.
by Rob
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.
by Rob
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...
by Rob
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
by Rob
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...
by Rob
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...
by Rob
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
image.png
by Rob
Mon Jun 19, 2023 12:43 pm
Forum: SW General
Topic: External Reference To Self!
Replies: 4
Views: 953

Re: External Reference To Self!

image.png
image.png
image.png
pretty cool
by Rob
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 :D

Nah everythings in context
image.png
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
by Rob
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...
by Rob
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...
by Rob
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' ...
by Rob
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?
by Rob
Fri Mar 11, 2022 5:33 pm
Forum: Kitty Dump
Topic: What do you listen to at work?
Replies: 464
Views: 221385

Re: What do you listen to at work?

zxys001 wrote: Fri Mar 11, 2022 10:46 am Hi Rob,.. this is great! Luv it! UU
yeah my thoughts too.. did you check out any of the others? pls share and tag if you tune yourself a good un! :D
by Rob
Fri Mar 11, 2022 4:29 am
Forum: Kitty Dump
Topic: What do you listen to at work?
Replies: 464
Views: 221385

Re: What do you listen to at work?

by Rob
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 ...
by Rob
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...
by Rob
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 ...
by Rob
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...
by Rob
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

mattpeneguy wrote: Fri Dec 17, 2021 9:08 am Is this what you are looking for?
http://help.solidworks.com/2018/english ... state.html
image.png
image.png (13.11 KiB) Viewed 2251 times
fraid not
by Rob
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...
by Rob
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

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.
Thanks @Austin - it makes me feel very tired when I look on there.
by Rob
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...
by Rob
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
by Rob
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...
by Rob
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...
by Rob
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...
by Rob
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
image.png
by Rob
Thu Oct 28, 2021 11:22 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

colt wrote: Thu Oct 28, 2021 10:54 am Another way is to create massless part that you can mate to the cg. Then you can mate to that object. It seems to follow the cg accurately on rebuild.

Capture.PNG
Up there for thinking, down there for dancing!
by Rob
Thu Oct 28, 2021 11:19 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

dpihlaja wrote: Thu Oct 28, 2021 10:55 am That is a great idea.

The only issue that I see is when/if one of the distances goes into the negative or becomes 0. How do you determine positive/negative direction?
I had the same concern, so I mated so that the assembly origin was at an extreme corner
by Rob
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...
by Rob
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...
by Rob
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...
by Rob
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...
by Rob
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...
by Rob
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?
image.png
2018 attached
by Rob
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
by Rob
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 ...
by Rob
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
by Rob
Mon May 10, 2021 6:58 pm
Forum: What's Wrong?
Topic: Empty Pages
Replies: 8
Views: 2664

Re: Empty Pages

AlexLachance wrote: Mon May 10, 2021 3:52 pm I noticed you chopped off the phone icons, wasn't judging you Rob :lol:

Edit: sorry for taking over your thread with my non-related posts.
I remember how bad the old forum was on mobile, this ones so slick
by Rob
Mon May 10, 2021 6:55 pm
Forum: What's Wrong?
Topic: Empty Pages
Replies: 8
Views: 2664

Re: Empty Pages

matt wrote: Mon May 10, 2021 4:35 pm Hmmm. I'm getting different results. Does this happen often? How does it make you feel? :ugeek:

Sorry.
Let me know if it happens again.
I've had a dig around in my settings - i guess this was the problem - hopefully it's fixed now
image.png
looks like it was my fault (as usual)
by Rob
Mon May 10, 2021 3:25 pm
Forum: What's Wrong?
Topic: Empty Pages
Replies: 8
Views: 2664

Re: Empty Pages

matt wrote: Mon May 10, 2021 8:17 am It looks like you did a search that returns no results? Can you give some context?
It happens when I click on a topic..

this one for example
image.png
I selected 1 year for time frame in above pic
image.png
but on clicking this is all i see
image.png
by Rob
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ɯǝʇ ɯ'ı
by Rob
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.
;;
image.png
notifications Loading...
by Rob
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
Screenshot_20210510-070934.png
As a side note it's sick how I did all this on my mobile.
by Rob
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...
by Rob
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
System Options > Collaboration > Enable multi-user environment > Add shortcut menu items...
by Rob
Fri May 07, 2021 10:09 am
Forum: Macro Library
Topic: Select Components
Replies: 5
Views: 2115

Re: Select Components

Tom G wrote: Fri May 07, 2021 9:46 am I do really wish that I could select only a folder and thereby select all its contents (not only highlight it in view), but accept that folders make selecting related items easier already.
..and that's a great idea for another macro :D
by Rob
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...