Cancel
Showing results for 
Search instead for 
Did you mean: 

Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor

Goodmorning everyone,

[SE2019]
I would have the following problem (first and second level):
After loading the assembly I must to manually
rename each file and replace it with another .par file
having the same name and pathname
example :
(before)
name File      | pathname | operation | NewFile    | newPathname
H01_X_P.par | c: / temp      | ..............  | ...............  | ......................


change to:
(after)
name File | pathname | operation     | NewFile | newPathname
H01.par    | c: / temp      | replacement    | H01.par | c: \ temp

(I mean I have to clean a part of the file name and replace it with another one)
can someone help me with a sample macro (if that is possible...) ?
Thanks to anyone who can help me
[Grfdev]

10 REPLIES 10

Re: Replace/rename many parts in Design Manager

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Re: Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor

Hello,
Now I convert it into vBasic and this weekend I try it
I will keep you informed
Thanks 1000
GrfDev

Re: Replace/rename many parts in Design Manager

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

@grfdev 

 

if you check the parent links from above you'll see there is also a VB.NET version already available ;-):

 

https://github.com/SolidEdgeCommunity/Samples/blob/master/RevisionManager/PerformRenameAction/vb/Per...

 

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor
thanks

Re: Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor

Hello,
I tried the program, which doesn't give errors, but I don't see any change on the design Manager. The paths remain the same as before ....
Thank you
grfdev

Re: Replace/rename many parts in Design Manager

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

@grfdev,

 

works perfectly for me.

I just verified on my own the original sample where I just adapted the path to the ASM document to a copy of the fourbar example of the Solid Edge training folder.

I copied the fourbar folder to another place, opened the asm and saved to get the links updated. Then I ran the example. All linked documents where renamed as foreseen by the example (using x64 configuration, not anyCPU).

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor

Hi,
I tried to compile the program but it gave me so many errors, then I copied the text in a button form and inside its sub I copied the vb.
I changed: assemblypath with my assembly.
I reopened my assembly but nothing changed :-(
I use SE2019  & vb.net 2015

thank you

grfdev

Highlighted

Re: Replace/rename many parts in Design Manager

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

@grfdev,

 

hard to say what's going wrong in your copy paste environment.

I recommend to work first on a copied version of the fourbar sample which you find in the training folder of Solid Edge.

  1. Copy the fourbar folder to somewhere you have full write access to.
  2. Open the fourbar assembly and save it to get the links to the components updated to the new location.
  3. Check it by using the Design Manager.
  4. Set in your source code the pathname of the assembly to be used to the copy of the fourbar assembly document.
  5. Now try to debug your program by setting a break point on the loop looping through all linked documents of the assembly document. Observe the values for the actual file names and the calculated new file names.
  6. If your program finished, check the fourbar folder. All components should have been renamed and the assembly document should reference the renamed components. Use the Design Manager to verify.

If you still should end up in happening nothing then try to download the complete Solid Edge Community Samples from Github https://github.com/SolidEdgeCommunity/Samples unpack the zip file and try to get the sample RevisionManager/PerformRenameAction running by performing all steps above on the original sample code project.

 

As mentioned in my previous post, it works. Check to use CPU configuration x64 as I did. Solid Edge 2019 and Visual Studio 2015 should be fine (but I used Visual Studio 2017).

 

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Replace/rename many parts in Design Manager

Valued Contributor
Valued Contributor

Hello,
As soon as I can, I will carefully follow your instructions and let you know.
Thank you for your kind help
grfDev