Message 1 of 5
Not applicable
12-02-2016
04:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I am trying to create a code based on this (Provided in another thread by Curtis Waguespac)
oName = InputBox("Enter a Name", "iLogic", "FrameWork")
' set a reference to the assembly component definintion.
' This assumes an assembly document is open.
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
i=0
'Iterate through all of the occurrences
Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAsmCompDef.Occurrences
i=i+1
oOccurrence.Name = oName & ":" & i
NextIt works great, but I need it to change the name but not the occurrence number.
Kinda like this:
Names of part files:
One type name:1
One type name:2
One type name:3
One type name:4
Another type name:1
Another type name:2
Another type name:3
Yet another type name:1
Yet another type name:2
Yet another type name:3
to
Framework:1
Framework:2
Framework:3
Framework:4
Framework:1
Framework:2
Framework:3
Framework:1
Framework:2
Framework:3
I found some codes that can separate the name from the number, but can figure out how to make it work properly,
Any help would really be appreciated 🙂
Solved! Go to Solution.