Applying updated templates to old documents

laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Applying updated templates to old documents

Unread post by laukejas »

I have completely reworked my templates for parts, documents and drawings, and I still have like 5 ongoing projects with ~400 documents in total that were created with the old templates. I am looking for a way to retroactively apply the changes I made in the new template to these old documents.

Changes I made are:
Document Properties (lots of stuff, several dozen changes)
Hide/Show Types (visibility of sketch relations, dimension names, etc.)
Annotation visibility
Turned off "suppress features" in default configuration in parts and "suppress new components" in assemblies
Selected "Configuration name" in default configuration (BOM Options)
Tree Display -> Show Component Name and Description in assemblies
Adjusted scene parameters
Added Bounding Box
Added several default Custom Properties

I found this tool to copy Document Properties from one document to another, but as you can see from my list, Document Properties are just a small part of the changes I made.

I think most of these changes should be doable with API (macro), but unfortunately macro recorder doesn't capture most of these changes, so writing it manually would be a lot of work.

I think it would be simpler if I could just re-create these documents from the new templates, and then copy over the content (Feature Manager Tree) from the old documents. This is actually very simple with assemblies - just create a new assembly from the old one, and then dissolve the old one. But with parts, I don't see an easy way - simple CTRL+C only works for simple features, not entire model history. Or maybe there is some way? As for drawings, I only have a few, so I can re-create them manually.

A few things that might make this easier if going by this second approach - I don't need to transfer material, since I reworked my material library anyway and will need to re-apply new materials. Same for Custom Properties, it would be easier to re-write them than try and convert old ones.

I am sure this is a common issue, but I haven't been able to find much useful info aside from that old tool. Can anyone share any tips and tricks to make this transition easier?
User avatar
SPerman
Posts: 1975
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 13
x 2148
x 1796
Contact:

Re: Applying updated templates to old documents

Unread post by SPerman »

#task from Central Innovations can automate most of what you are asking for. It has built in features for some of it. It will also run a custom macro (or several) along all selected parts.

@mp3-250 has done quite a bit of research documenting and understanding the document properties. He talks about it in this thread, but there might be another with more info: System option and document properties

Depending on the age of your files, they would still be based on "old templates". I think the old templates fear an old wives tale from DSS, with little evidence of problems in recent years, but I could be wrong. If you truly want everything on a new template, the only way to do that is your second method. If you want to keep the model history, and all of the relations, that would be quite a daunting task. It would certainly require more coding effort than making changes to properties.
Attachments
image.png
image.png (10.45 KiB) Viewed 318 times
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Re: Applying updated templates to old documents

Unread post by laukejas »

SPerman wrote: Sun Sep 15, 2024 8:03 am #task from Central Innovations can automate most of what you are asking for. It has built in features for some of it. It will also run a custom macro (or several) along all selected parts.

@mp3-250 has done quite a bit of research documenting and understanding the document properties. He talks about it in this thread, but there might be another with more info: System option and document properties

Depending on the age of your files, they would still be based on "old templates". I think the old templates fear an old wives tale from DSS, with little evidence of problems in recent years, but I could be wrong. If you truly want everything on a new template, the only way to do that is your second method. If you want to keep the model history, and all of the relations, that would be quite a daunting task. It would certainly require more coding effort than making changes to properties.
Thank you, I wasn't aware #task can do this. Definitely worth looking into.

But yeah, some of my parts were based on templates that were originally created back in 2002 or so, and updated over the years. I do occasionally have problems with them (mostly when doing sheet metal and weldments), so it might make sense to re-create templates entirely from scratch. But that leaves me with only option #2. I know I could do Insert Part of the old doc into a new doc from new template, but that makes modifications much more difficult. Exporting into Parasolid, reimporting, and recreating features with FeatureWorks also won't work, my parts are too complex and have configurations. Can't think of anything else.

But maybe there is some way to transfer all features from one part to another? I wonder if anyone has made some tool that automates this?
User avatar
gupta9665
Posts: 388
Joined: Thu Mar 11, 2021 10:20 am
Answers: 20
Location: India
x 409
x 428

Re: Applying updated templates to old documents

Unread post by gupta9665 »

Have you tried insert part into part, and then breaking the link?
Deepak Gupta
SOLIDWORKS Consultant/Blogger
laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Re: Applying updated templates to old documents

Unread post by laukejas »

gupta9665 wrote: Sun Sep 15, 2024 10:56 am Have you tried insert part into part, and then breaking the link?
Break how?
image.png
You mean External References -> Break All? Or selecting "Break Link" when creating Insert Part feature? Neither of these imports sketches and features...

EDIT: correction, it does work for some parts (not all of them, not sure why), and for some it just explicitly shows error message, like this:
image.png
And even when it works, it also deletes all equations...
User avatar
gupta9665
Posts: 388
Joined: Thu Mar 11, 2021 10:20 am
Answers: 20
Location: India
x 409
x 428

Re: Applying updated templates to old documents

Unread post by gupta9665 »

Sorry, but I do not think there is any other alternative. There might be some paid tools available but there won't be any less costly version.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
Ömür Tokman
Posts: 356
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 986
x 341
Contact:

Re: Applying updated templates to old documents

Unread post by Ömür Tokman »

would you look into this?
I am adding the macro. I remember it as bulk anted changing.

set language from subtitle options.
Attachments
DrawingTemplate Switcher.rar
(337.18 KiB) Downloaded 24 times
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Re: Applying updated templates to old documents

Unread post by laukejas »

Ömür Tokman wrote: Mon Sep 16, 2024 10:32 am would you look into this?
I am adding the macro. I remember it as bulk anted changing.

set language from subtitle options.
Thank you, this looks like a great tool to update drawings. I'm saving it for later. But for now, it's far more important for me to transfer parts to a new template. But perhaps like Gupta said, it is impossible after all...
User avatar
AlexB
Posts: 482
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 27
x 256
x 429

Re: Applying updated templates to old documents

Unread post by AlexB »

I don't think it's necessarily impossible, but it may need to be tailored to your situation (as Deepak (@gupta9665) mentioned).

The problems for me when I've run into this are with BOM tables and revision tables. It's difficult to update the formats of those if they've changed without just re-adding them. Then you have to deal with placing balloons again and re-attaching leaders, etc. So, it's possible, but knowing exactly what you're going from to what you're going to helps in developing a solution to update the sheet templates.

Then if you're using blocks on your template, you'll run into determining which instances need to be removed unless you get rid of them all and re-add them again. It's a whole convoluted process.

You may find a generalized solution that can get you most of the way there but I doubt there's something that will work right out of the box to do what you need.
laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Re: Applying updated templates to old documents

Unread post by laukejas »

AlexB wrote: Mon Sep 16, 2024 10:55 am I don't think it's necessarily impossible, but it may need to be tailored to your situation (as Deepak (@gupta9665) mentioned).

The problems for me when I've run into this are with BOM tables and revision tables. It's difficult to update the formats of those if they've changed without just re-adding them. Then you have to deal with placing balloons again and re-attaching leaders, etc. So, it's possible, but knowing exactly what you're going from to what you're going to helps in developing a solution to update the sheet templates.

Then if you're using blocks on your template, you'll run into determining which instances need to be removed unless you get rid of them all and re-add them again. It's a whole convoluted process.

You may find a generalized solution that can get you most of the way there but I doubt there's something that will work right out of the box to do what you need.
But you're talking about drawings here, right? I don't need to transfer these to a new template. I just need to do this with parts and assemblies. Mostly parts, transferring model history (sketches, features, configurations, equations, etc.). Everything else is simple enough to fix manually, but this bit is what takes most time to re-make.
User avatar
AlexB
Posts: 482
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 27
x 256
x 429

Re: Applying updated templates to old documents

Unread post by AlexB »

laukejas wrote: Mon Sep 16, 2024 11:19 am But you're talking about drawings here, right? I don't need to transfer these to a new template. I just need to do this with parts and assemblies. Mostly parts, transferring model history (sketches, features, configurations, equations, etc.). Everything else is simple enough to fix manually, but this bit is what takes most time to re-make.
Yes, I was referring mostly to drawings, but a good amount applies to part and assembly models to. As you mentioned, you have a lot of customized configuration property options selected, display options, etc. so a general tool will only get you part of the way there.

This does give me an idea for a new tool/utility that could be useful for the masses.
laukejas
Posts: 166
Joined: Sun Sep 05, 2021 8:27 am
Answers: 0
x 36
x 96

Re: Applying updated templates to old documents

Unread post by laukejas »

AlexB wrote: Mon Sep 16, 2024 11:36 am Yes, I was referring mostly to drawings, but a good amount applies to part and assembly models to. As you mentioned, you have a lot of customized configuration property options selected, display options, etc. so a general tool will only get you part of the way there.

This does give me an idea for a new tool/utility that could be useful for the masses.
Yeah, while were discussing this, I wrote a macro that can update a part made with an old template, to match the settings of a new template. That is easy enough. Problem is transferring all the part info into a fresh part made from a new template. Parts made on old templates often give lots of issues, no matter how much you update them...
Post Reply