Search found 51 matches

by Jacomuller
Tue Dec 10, 2024 4:58 pm
Forum: How To Questions
Topic: How to batch change the state of Assemblies/parts in SW19 PDM
Replies: 10
Views: 678

Re: How to batch change the state of Assemblies/parts in SW19 PDM

Thanks for the feedback - I have been programming in VB6 for many years - I am very old school. :)

I will put this one in the "too hard basket" for now. I am a Mechanical engineer doing some programming for fun. Thanks again for your time.
by Jacomuller
Tue Dec 10, 2024 3:28 pm
Forum: How To Questions
Topic: How to batch change the state of Assemblies/parts in SW19 PDM
Replies: 10
Views: 678

Re: How to batch change the state of Assemblies/parts in SW19 PDM

jcapriotti SPerman , I have done a number of VBA macro's for Solidworks. For example, I have a macro that will with a click of the button, create a PDF file as well as a DXF file of a drawing. It will then save those files in the PDM, delete copies of old versions on the those files on the factory ...
by Jacomuller
Sun Dec 08, 2024 4:01 pm
Forum: How To Questions
Topic: How to batch change the state of Assemblies/parts in SW19 PDM
Replies: 10
Views: 678

Re: How to batch change the state of Assemblies/parts in SW19 PDM

Thanks @jcapriotti , lazy me :) . I was hoping for a bit of code to transition a list of part through 5 states with the click of a button. No worries, I will do it the hard way then. grumph
by Jacomuller
Thu Dec 05, 2024 8:08 pm
Forum: How To Questions
Topic: How to batch change the state of Assemblies/parts in SW19 PDM
Replies: 10
Views: 678

How to batch change the state of Assemblies/parts in SW19 PDM

We have hundreds of parts and assemblies in a certain workflow state. I am the PDM administrator and I want to change the workflow state of all those parts with a VBA macro. I did some google searches but couldn't find any sample code. Si there anybody with some ideas how to do this? Most of the par...
by Jacomuller
Wed Oct 30, 2024 1:51 am
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

Re: How to unselect "Display sheet Format" in VBA

Thanks @gupta9665 . It is now working fine.
by Jacomuller
Tue Oct 29, 2024 5:48 pm
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

Re: How to unselect "Display sheet Format" in VBA

Hi @RonE

Do you have some wisdom about this issue? It should be very similar to the problem you solved earlier - I am just not skilled enough to connect the dots. grumph

Regards

Jaco
by Jacomuller
Tue Oct 29, 2024 5:43 pm
Forum: How To Questions
Topic: Set "Bill of Materials" table properties with VBA code
Replies: 4
Views: 481

Re: Set "Bill of Materials" table properties with VBA code

Hi @RonE

Thanks, it did the job. I am a self taught VBA programmer. Hopefully I will get better at it soon :D. I just need more reference material about the API

Regards
Jaco
by Jacomuller
Mon Oct 28, 2024 7:19 pm
Forum: How To Questions
Topic: Set "Bill of Materials" table properties with VBA code
Replies: 4
Views: 481

Re: Set "Bill of Materials" table properties with VBA code

Hi RonE Thanks for the message. I saw that before but I cannot get it to work. I have actually tried ChatGPT to help :D but I still cannot get it going. This is the code I got from ChatGPT: Sub SetPartConfigurationGrouping() Dim swApp As SldWorks.SldWorks Dim swModel As ModelDoc2 Dim swAssembly As A...
by Jacomuller
Sun Oct 27, 2024 6:06 pm
Forum: How To Questions
Topic: Set "Bill of Materials" table properties with VBA code
Replies: 4
Views: 481

Set "Bill of Materials" table properties with VBA code

I am using VBA code to automatically generate shop floor papers. As part of the process I create a Bill of Material Table to list all parts for an assembly. I have one part used in two different sub assemblies of the main assembly. The problem now is that this parts with the same part number, descri...
by Jacomuller
Sun Oct 27, 2024 5:40 pm
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

Re: How to unselect "Display sheet Format" in VBA

In a similar case, how do I set "Display all configuration of the same part as one item" as "Part configuration Grouping" with VBA code?
image.png
by Jacomuller
Thu Oct 24, 2024 8:23 pm
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

Re: How to unselect "Display sheet Format" in VBA

#SPerman - I have tried it before and it use to work, but for some reason it is not working now. This is my code: Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swDraw As SldWorks.DrawingDoc Dim swSheet As Sheet Dim SelMan As SldWorks.SelectionMgr Dim retval As ...
by Jacomuller
Thu Oct 24, 2024 6:17 pm
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

How to unselect "Display sheet Format" in VBA

G'Day I use a macro to insert a new custom size sheet in a Solidworks 2019 drawing. (I have created a custom template "TAG_MW_Single_View".) The macro work well and it sets all properties as required. The only thing missing is to deselect "Display sheet format". I have recorded m...
by Jacomuller
Sun Aug 04, 2024 5:01 pm
Forum: How To Questions
Topic: Copy a view from one drawing to a view in a new drawing with VBA
Replies: 4
Views: 883

Re: Copy a view from one drawing to a view in a new drawing with VBA

SPerman wrote: Fri Aug 02, 2024 7:04 am See if this helps.

https://help.solidworks.com/2018/englis ... ple_VB.htm
Thanks, I got enough info from that sample to get my code to past the new view where I want it. Thanks again ><
by Jacomuller
Thu Aug 01, 2024 7:33 pm
Forum: How To Questions
Topic: Painted part vs unpainted part part number in solidworks.
Replies: 4
Views: 1012

Re: Painted part vs unpainted part part number in solidworks.

I suppose there are many ways to skin a cat :D . For the time being I will stick with what we are doing.

this is just an example of a treehouse
image.png
by Jacomuller
Thu Aug 01, 2024 7:16 pm
Forum: How To Questions
Topic: Copy a view from one drawing to a view in a new drawing with VBA
Replies: 4
Views: 883

Copy a view from one drawing to a view in a new drawing with VBA

I have now manage to get the macro running to open a specific drawing, activate a specific sheet and copy a selected view, close the drawing and paste the selection in the current drawing. The issue now is that the new drawing view is not pasted in the correct position. Earlier in the Macro, I creat...
by Jacomuller
Wed Jul 31, 2024 5:18 pm
Forum: How To Questions
Topic: Painted part vs unpainted part part number in solidworks.
Replies: 4
Views: 1012

Painted part vs unpainted part part number in solidworks.

I am wondering if there is a better way of handling processes to parts in Solidworks. For the bulk of it, we only have a part number for the finished part in the solidworks model. For example: We laser cut a profile out of 10mm plate. We then bend the plate to form a "Bend Part", we then p...
by Jacomuller
Tue Jul 30, 2024 7:02 pm
Forum: How To Questions
Topic: Copy a view from one drawing to a view in a new drawing with VBA
Replies: 4
Views: 883

Re: Copy a view from one drawing to a view in a new drawing with VBA

Maybe my approach was wrong. I have written the macro to create predefined views which I was hoping to be able to be updated with a view from a part drawing. Since I have the name of the drawing, the full path of the drawing file and the the name of the view, Maybe I should have tried to copy the re...
by Jacomuller
Tue Jul 30, 2024 12:30 am
Forum: How To Questions
Topic: Copy a view from one drawing to a view in a new drawing with VBA
Replies: 4
Views: 883

Copy a view from one drawing to a view in a new drawing with VBA

I want to automate one of our shop floor papers. We have a 1 page document with a drawing of an assembly in the top left. I want the macro to list all the parts with some detail from the custom properties of each part. There must also be a single view drawing with some production related information...
by Jacomuller
Tue Jul 30, 2024 12:08 am
Forum: Macro Library
Topic: VBA to add text to a specific drawing View.
Replies: 4
Views: 1089

Re: VBA to add text to a specific drawing View.

Hi JSculley . thanks again for your input. I got the "clean-up" working so all unused views will be deleted at the end of the macro. I couldn't get the resizing of the views/text to work but that is ok. The next step is to copy a view from one drawing to a specific view in this drawing. I ...
by Jacomuller
Sun Jul 28, 2024 5:38 pm
Forum: Macro Library
Topic: VBA to add text to a specific drawing View.
Replies: 4
Views: 1089

Re: VBA to add text to a specific drawing View.

Good Morning JSculley . I fiddled a bit with the code and it is working fine, thanks again for your help UU . It still continuously working on making it better. Is there a way I can set the "wordwrap width" with the code? Keep in mind that I don't have "SOLIDWORKS Document Manager API...
by Jacomuller
Thu Jul 25, 2024 1:01 am
Forum: Macro Library
Topic: VBA to add text to a specific drawing View.
Replies: 4
Views: 1089

VBA to add text to a specific drawing View.

I have a create a macro to add 15 empty views to a drawing. Each view represent a part from a BOM for an assembly. This is for our production team on the shop floor. I have created an array text strings, build-up from a number of Custom properties of each parts. I now want to add a text string to ea...
by Jacomuller
Mon Jun 17, 2024 4:19 pm
Forum: How To Questions
Topic: Change mouse pointer with VBA
Replies: 4
Views: 1286

Re: Change mouse pointer with VBA

Thanks JSculley , was thinking about that, but not sure how to implement it. Normally you would know the total number of actions/events and then show the percentage completed on the status bar. In this case, I want to delete all instances of a file outside the PDM on a network drive and replace it w...
by Jacomuller
Sun Jun 16, 2024 10:20 pm
Forum: How To Questions
Topic: Change mouse pointer with VBA
Replies: 4
Views: 1286

Change mouse pointer with VBA

I wrote a macro to delete and copy a file on a number of different net work drive locations. This can take up to 45 seconds in which time I don't want the user to fiddle around clicking other stuff. So the idea is to change the mouse pointer to an hourglass at the start of the macro and then to retu...
by Jacomuller
Thu Jun 13, 2024 9:58 pm
Forum: How To Questions
Topic: Solidworks PDM - Delete checked-in file with VBA
Replies: 9
Views: 1827

Re: Solidworks PDM - Delete checked-in file with VBA

>< Thanks @AlexB , I had a typo in the way I construct the file path. it is now working fine.
by Jacomuller
Tue Jun 11, 2024 6:17 pm
Forum: How To Questions
Topic: Solidworks PDM - Delete checked-in file with VBA
Replies: 9
Views: 1827

Re: Solidworks PDM - Delete checked-in file with VBA

My code for testing to delete a file from the PDM is:
image.png
there is a "run-time error 91" at the line starting with "Set Myfile.."

Am I missing something in the code?
by Jacomuller
Wed Jun 05, 2024 8:03 pm
Forum: How To Questions
Topic: Solidworks PDM - Delete checked-in file with VBA
Replies: 9
Views: 1827

Re: Solidworks PDM - Delete checked-in file with VBA

AlexB thanks. I saw that one yesterday. It is a very handy utility. I will grab the parts I need from the VB and use that in my VBA macro. My macro does a lot of things of which the "delete the PDF in the PDM" is just a small part. I suppose I was lazy and looking for a quick fix :) . I w...
by Jacomuller
Tue Jun 04, 2024 10:50 pm
Forum: How To Questions
Topic: Solidworks PDM - Delete checked-in file with VBA
Replies: 9
Views: 1827

Solidworks PDM - Delete checked-in file with VBA

I am trying to delete a file from the PDM but it is not working for me. This is the code I have: ' DeleteFile = sPathName & DeleteFileFilter ' sFileName 'DeleteFileFilter ' If Dir(DeleteFile) <> "" Then ' 'MsgBox "This File Exists" ' If Len(Dir(DeleteFile)) > 0 Then ' SetAttr...
by Jacomuller
Thu Dec 14, 2023 8:57 pm
Forum: How To Questions
Topic: Transform a point in 3d sketch to a new coordinate system.
Replies: 8
Views: 2558

Re: Transform a point in 3d sketch to a new coordinate system.

>< @ryan-feeley Thanks mate =)
I had to massage it a little but it appears to be working now. I still need to cleanup the code a bit, but I am getting the the transformed values now in the CSV file.
by Jacomuller
Thu Dec 14, 2023 7:07 pm
Forum: How To Questions
Topic: Transform a point in 3d sketch to a new coordinate system.
Replies: 8
Views: 2558

Re: Transform a point in 3d sketch to a new coordinate system.

SPerman Yip, I have done it that way a few times. I was just thinking of making it easier for other people in the team. Also, by doing it the way I want, I can leave the original part modeled from the scan data and move the coordinate system to suite the Bender. If, for what ever reason, the bender...
by Jacomuller
Thu Dec 14, 2023 5:36 pm
Forum: How To Questions
Topic: Transform a point in 3d sketch to a new coordinate system.
Replies: 8
Views: 2558

Re: Transform a point in 3d sketch to a new coordinate system.

Thanks SPerman , ryan-feeley . I saw those websites but I still struggling :? :lol: So I have a 3D sketch for the center line of the exhaust pipe. I have a number of points in the 3D sketch required for the bender. I have created the "New" coordinate system in a location that will work wit...
by Jacomuller
Wed Dec 13, 2023 11:09 pm
Forum: How To Questions
Topic: Transform a point in 3d sketch to a new coordinate system.
Replies: 8
Views: 2558

Transform a point in 3d sketch to a new coordinate system.

I want to use scan data from a exhaust pipe to create a bend table for our bender. It uses XYZ and not LRA coordinate system. I can postprocess the scan data to generate a center line based on lines and arcs. I have also create a macro that will generate a CSV file with the XYZ coordinates of each p...
by Jacomuller
Wed Nov 08, 2023 8:35 pm
Forum: How To Questions
Topic: Replace all instances of a file on a network drive with new version
Replies: 7
Views: 1710

Re: Replace all instances of a file on a network drive with new version

I have done the "loop through all folders and subfolder" thing and it works - it is a bit slow, but will do for now - a lot faster than manual and no errors :D . There are about 3500 folders and 9000 files to check and it is done in about 5 sec. So it is all good.
by Jacomuller
Wed Nov 08, 2023 3:36 pm
Forum: How To Questions
Topic: Replace all instances of a file on a network drive with new version
Replies: 7
Views: 1710

Re: Replace all instances of a file on a network drive with new version

bnemec Thanks for the reply. We have our product specific components and then we have generic parts. The generic part numbers start with 000- , so it is easy to separate. The issue is with parts that are not generic, but is used in two or three (max 6) other products. We have about 800 products wit...
by Jacomuller
Wed Nov 08, 2023 1:01 am
Forum: How To Questions
Topic: Replace all instances of a file on a network drive with new version
Replies: 7
Views: 1710

Replace all instances of a file on a network drive with new version

We have a small engineering department using Solidworks and PDM. The factory is in a separate building and does not have access to the PDM. We have a folder system on the network with folders for each product. We then have a subfolder for DXF files and a subfolder for PDF drawings. I have created a ...
by Jacomuller
Mon Oct 16, 2023 10:01 pm
Forum: How To Questions
Topic: Assembly custom property linked to part configuration
Replies: 10
Views: 2398

Re: Assembly custom property linked to part configuration

Hi josh , I have tried to use the same technique as what you have done, but I am struggling. If it was in the VB editor, it would have been a bit easier (Since I don't code that often :D ) but doing in the custom properties field is challenging. In essence, what I want to do is the following (writte...
by Jacomuller
Sun Oct 15, 2023 4:15 pm
Forum: SW General
Topic: Total number of component as custom property...
Replies: 12
Views: 2111

Re: Total number of component as custom property...

I have added two lines of to skip sub-assemblies as I am only interested in individual parts. 1 Dim vComps As Variant Dim Cnt As Long Dim i As Long vComps = Assembly.GetComponents(False) For i = 0 To UBound(vComps) If vComps(i).GetSuppression2 <> 0 Then If vComps(i).GetModelDoc2.GetType = swDocPART ...
by Jacomuller
Wed Oct 11, 2023 9:13 pm
Forum: How To Questions
Topic: Assembly custom property linked to part configuration
Replies: 10
Views: 2398

Re: Assembly custom property linked to part configuration

Yip, will have a new look at it with that in mind, thanks.
by Jacomuller
Tue Oct 10, 2023 7:33 pm
Forum: How To Questions
Topic: Total number of componenets in Assembly
Replies: 4
Views: 1584

Total number of componenets in Assembly

oa
I want to create a custom property for an assembly to show the number of parts in the assembly. Basically I want to
image.png
Link this to a custom property.
by Jacomuller
Tue Oct 10, 2023 6:14 pm
Forum: SolidWorks PDM
Topic: Cannot undo file checked out on a "dead" computer
Replies: 12
Views: 2927

Re: Cannot undo file checked out on a "dead" computer

>< ><
Finally - Thanks to @bnemec I have solved the issue. I had Admin in all the groups and the group policy prevented the "check out by other user" to be check-in.
by Jacomuller
Mon Oct 09, 2023 9:34 pm
Forum: SolidWorks PDM
Topic: Cannot undo file checked out on a "dead" computer
Replies: 12
Views: 2927

Re: Cannot undo file checked out on a "dead" computer

This is a screen shot of the "Undo check out". I was expecting a warning that the file is checked out on another computer by another user, but that it will still allow me to undo the check out
image.png
by Jacomuller
Mon Oct 09, 2023 5:43 pm
Forum: SolidWorks PDM
Topic: Cannot undo file checked out on a "dead" computer
Replies: 12
Views: 2927

Re: Cannot undo file checked out on a "dead" computer

I have tried both as "Admin" as well as on my account. Both just give me the same screen. It is the same whether I have the "Can undo check out files checked out by other users" selected or not selected. I normally set at group level, not user level.
by Jacomuller
Mon Oct 09, 2023 4:40 pm
Forum: How To Questions
Topic: Assembly custom property linked to part configuration
Replies: 10
Views: 2398

Re: Assembly custom property linked to part configuration

Dwight . Thanks for the feedback. I would prefer to have the data in the Assembly's custom properties as I am using another macro to populated data for the ERP from the Assembly's custom properties. bnemec The "ZPaint" part is actually a spray gun that is visible in BOM drawing. In the BO...
by Jacomuller
Mon Oct 09, 2023 2:01 am
Forum: SolidWorks PDM
Topic: Cannot undo file checked out on a "dead" computer
Replies: 12
Views: 2927

Cannot undo file checked out on a "dead" computer

One of the Pc's in the office died and there were a few files checked out by another user. I have admin rights, but for some reason can I not get the undo check out to work. I use SW2019 with PDM professional. I have done the required permissions etc. but it is not working.
by Jacomuller
Sun Oct 08, 2023 6:49 pm
Forum: How To Questions
Topic: Advance BOM with Drawing View
Replies: 4
Views: 1423

Re: Advance BOM with Drawing View

Thanks, I will have a look at it when your done :)
by Jacomuller
Thu Oct 05, 2023 6:31 pm
Forum: How To Questions
Topic: How to handle supersede parts in Solidworks PDM
Replies: 5
Views: 1443

Re: How to handle supersede parts in Solidworks PDM

I have tried the method recommended by @CarrieIves, but it still the "discontinued" part can still be selected by the designers. Not sure if I did something wrong. I was hoping that all existing assemblies with the discontinued parts will still work as before, but designers should not be a...
by Jacomuller
Thu Oct 05, 2023 6:25 pm
Forum: How To Questions
Topic: Assembly custom property linked to part configuration
Replies: 10
Views: 2398

Assembly custom property linked to part configuration

The way we address "paint" in our assemblies (mainly for EPR and BOM purposes) is to have a "dummy" part called ZPAINT in all assemblies. This dummy part has many configuration indicating the paint or powder coat process, the colour and the texture. I want the a custom property c...
by Jacomuller
Wed Oct 04, 2023 9:48 pm
Forum: How To Questions
Topic: How to handle supersede parts in Solidworks PDM
Replies: 5
Views: 1443

How to handle supersede parts in Solidworks PDM

We have about 800 assemblies in our PDM. Most of these assemblies use some generic parts. From time to time we update these generic parts. The challenge is to to keep the older generic parts in the PDM and keep using it in older designed assemblies, but to prevent designers to use these parts in new...
by Jacomuller
Wed Oct 04, 2023 9:36 pm
Forum: How To Questions
Topic: Advance BOM with Drawing View
Replies: 4
Views: 1423

Re: Advance BOM with Drawing View

Thanks, I missed your answer before - got side tracked :) I can use parts of it but it will still need a few major steps.