iLogic Design Copy - making multiple copies?

iLogic Design Copy - making multiple copies?

Anonymous
Not applicable
1,126 Views
8 Replies
Message 1 of 9

iLogic Design Copy - making multiple copies?

Anonymous
Not applicable
Hi everyone!

I am wondering if anyone has automated making multiple copies with the iLogic Design Copy tool.

 

I make 10 to 15 copies almost every time I use this tool and it has become quite tedious.  Is there a way to automate this for multiple copies? The only change for each iteration is an incrementing prefix (i.e. "30_01_", "30_02_").

 

Any suggestions?

0 Likes
1,127 Views
8 Replies
Replies (8)
Message 2 of 9

rhasell
Advisor
Advisor

Hi

I came across "Design Cloner" the other day. I have used it a few times already and it works extremely well.

 

Link to post:

https://forums.autodesk.com/t5/inventor-forum/is-there-a-way-to-rename-faster-like-find-and-replace/...

 

Link to Video:

https://www.youtube.com/watch?v=YPV_2IlnhXM

 

Reg
2026.1
0 Likes
Message 3 of 9

Anonymous
Not applicable

Oooh! Looks interesting! Thanks for the links - I'll check it out.

0 Likes
Message 4 of 9

Anonymous
Not applicable

Hmm, doesn't seem to work with IV2019

0 Likes
Message 5 of 9

rhasell
Advisor
Advisor

Hi

 

That's odd? It  works perfectly for me. I have created two new projects (Duplicates) with it already.

I still need to revise my Signature, but I am running 2019.1.1

 

Is there perhaps an error you could share in order to troubleshoot the problem?

 

Reg
2026.1
0 Likes
Message 6 of 9

Anonymous
Not applicable

Here is the error when I try to run it:

 

DesignClonerError.png

 

 

0 Likes
Message 7 of 9

Anonymous
Not applicable

I have found Copy Design Tool, which is great, but doesn't do multiple copies at once. Will keep searching...

0 Likes
Message 8 of 9

rhasell
Advisor
Advisor

Hi

 

Strange that the program does not run, perhaps you can send the message to the developers? (Also Inventor needs to be running in the background for the software to work.)

The Copy design tool looks similar to the design cloner, anything that does what Design Assistant does, but quicker, is a win in my book. (Though I still use Design Assistant on a daily basis for other tasks)

 

Reg
2026.1
0 Likes
Message 9 of 9

clive.w66LR9
Contributor
Contributor

This is a mess but it works and only adds a prefix as number. This only works if you run it from within a assembly that contains the assembly you want to copy, and once again yes the code is a mess. But it will give you an idea of what you can do. tweak it and make it your own. 

 

Hello = MessageBox.Show("To use this function a few thing to note" & vbNewLine & "   - You use it from the Main Assembly not from the assembly you want to copy"& vbNewLine & "   - It doesn't work for assemblys within assemblys","Frametek Ilogic Copy V.1.0", MessageBoxButtons.OKCancel)

'If the messege box ok was selectedf then
If Hello = vbOK Then
'Pick The Assm to Ilogic Copy
Dim PptcasP As Object
PptcasP = ThisServer.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter, "Pick Assm To Copy")



'Cast as Document
Dim Pptc As Document
Pptc = PptcasP.Definition.Document


Dim PptcFFN As String = Right(Pptc.FullDocumentName,(Len(Pptc.FullDocumentName)-(Left(Pptc.FullDocumentName, Len(Pptc.FullDocumentName)).LastIndexOf("\")+1)))
MessageBox.Show(PptcFFN , "Title")

'Ask how many copies they would like
myparam = InputBox("How many times would you like to icopy the assembly?", "How Many Copys?", "1")




'Set Prefix
Dim Prefix As Integer
Prefix = 0

NextF:
Prefix += 1

'Make a Case
Select Case Prefix
	
	
Case 1 To myparam 
	
'Selected Assm Save File Location
Dim Slop As String
Slop = Left(Pptc.FullFileName,Len(Pptc.FullFileName)-4) & "" & Prefix & ".iam"


'Check if file exists already
If System.IO.File.Exists(Slop) Then
    GoTo NextF:
End If  




'Copy Selected
Pptc.SaveAs(Slop,True)


'New Document
Dim NewDoc As Document
NewDoc = ThisApplication.Documents.Open(Slop, False)'Needs to Change to False

	
	
'Comp Occurance for "Name"
Dim ComDef As AssemblyComponentDefinition = NewDoc.ComponentDefinition
For Each oOcc As ComponentOccurrence In ComDef.Occurrences

Dim DNoOcc As String = oOcc.Name
'MessageBox.Show(DNoOcc, "Title")

If Right(DNoOcc,2) <> ":1" Then
	GoTo CecilsAuntiesFriend
End If

'Get the def and name
Dim oOccFN As String = oOcc.ReferencedDocumentDescriptor.FullDocumentName


Dim Cecil As Document = ThisApplication.Documents.Open(oOccFN,False)

	
'['Saves Each Ref Doc

'Get Path of Ref Doc
Dim RefDP As String = Cecil.FullFileName

'Get Filename of Cecil by Postion of "\"
Dim PostLC As Integer
PostLC = Left(RefDP, Len(RefDP)).LastIndexOf("\") +2


'File Name(minis ipt or iam)
Dim FNCecil As String 
FNCecil = Left(Strings.Mid(RefDP, PostLC), Len(Strings.Mid(RefDP, PostLC)) -4)

'New Name For the Cecils
Dim NewNCecil As String
NewNCecil = FNCecil & "_" & Prefix & ".ipt"



'Make File Path
Dim FPOfDoc As String
FPOfDoc = Left(RefDP, (PostLC - 1)) & NewNCecil


'Check if file exists already
If System.IO.File.Exists(FPOfDoc) Then
    GoTo CecilsAuntiesFriend
End If  


'Save Part
Cecil.SaveAs(FPOfDoc,True)


']




'Update the refrences of the file using replace
oOcc.Replace(FPOfDoc,True)
Cecil.Close()
CecilsAuntiesFriend:
Next


NewDoc.Update()
NewDoc.Save
NewDoc.Close

GoTo NextF
End Select
End If

 

 

0 Likes