Hi all
I have to create 300 pieces with their drawing
What changes in the 3D model:
- The length of the CAD model
I also have to manage and be able to manage the custom properties of my part that points to my data card that points in the cartridge of my drawing:
- Materials
-Finishing
-Product code
-Designation
-etc...
How can I create all these parts without making 300 copies of trees?
If possible thank you for your feedback
Is it not possible to have a single plan with a dimension of length L and a value table?
(so much simpler and faster)
Otherwise, one solution among others but which requires the MyCADtool suite:
Generate all the configurations in one file and then export each configuration to a part file with batch converter.
3 Likes
A macro can do the job in part, for the update of the properties you need more information.
See this code for part in part-1.
Option Explicit
Sub main()
Dim Path As String
Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")
Path = "D:\MyFiles\Part"
If fso.Fileexists(Path & ".SLDPRT") Then
Call fso.CopyFile(Path & ".SLDPRT", Path & "-1.SLDPRT")
Else
Call fso.CopyFile(Path & ".SLDASM", Path & "-1.SLDASM")
End If
Call fso.CopyFile(Path & ".SLDDRW", Path & "-1.SLDDRW")
Dim swApp As SldWorks.SldWorks
Set swApp = Application.SldWorks
If fso.Fileexists(Path & ".SLDPRT") Then
Call swApp.ReplaceReferencedDocument(Path & "-1.SLDDRW", Path & ".SLDPRT", Path & "-1.SLDPRT")
Else
Call swApp.ReplaceReferencedDocument(Path & "-1.SLDDRW", Path & ".SLDASM", Path & "-1.SLDASM")
End If
End Sub
Spring:
Or other code (not tested:
2 Likes
I prefer the solution of @Silver_Surfer :
1 part with excel file of family of parts so you can manage length and custom properties, then you explode the part with config to make your 300 parts.
3 Likes
Hello
I don't know the PDM at all... but wouldn't a part with configs created with a family of parts be enough?
1 Like
Hi all
Thank you for your answers
A single plane with a length and an array won't work since I need to have all my lengths available to make my assemblies. In addition, I need to have one plan per reference since all the plans will be linked to our ERP which outputs the plan automatically thanks to the item code of the plan.
The answer of @sbadenis seems complicated to me, I have no knowledge of Macro and I don't have too much time to self-train...
The answers from @Silver_Surfer and @Domino_Day don't seem too bad to me, but do they allow me to fill in the data cards in the PDM, I'll try to find out and try it out.
@twathle before I had the PDM that's what I would have done, but the problem is that we are starting with the PDM and we have to change our way of thinking, which no longer sticks
I'm going to close the subject and try to rethink my need with what is possible
Thank you again to all
Hello
There was a time when there was a utility that allowed you to create unit files from configuration files.
If I get my hands on it again, I'll share it if it still works with newer versions of SW.
As far as PDM is concerned, the operation being bidirectional, if your cards are correctly mapped it should go up without any problem.
You just have to create the data in a table (family of parts) and roll.