Mass Unit Change

Hi everyone

I have to deal with large files of parts in bulk with property additions. I saw that with Batch Properties it was done well, but I can't find how to change the units in bulk. Is this possible via Batch Properties? If not, which utility should I use?

Thanks in advance

1 Like

Hello
I do not quite understand your description of the need for " large bulk files of documents"??? and " how to change units en masse ".
Can you elaborate.

With CopyOption (MycadTools) you should be able to copy the standard from one template document to other documents.
CopyOptions Help:

Otherwise it seems to me that you can also change the skin and therefore the units via Integration:

2 Likes

@Le_Bidule : For explanation :slight_smile: , I have folders by categories/types of parts. I would like to process these files so that all the rooms inside are impacted (mass processing)
And the desired treatment would be the change of the units in the document property.

@sbadenis : Thank you for your answer :+1:. I was already testing CopyOptions. Integration I didn't know yet. It looks vast and powerful.

I tested CopyOptions which works but not 100%.
Let me explain...
Here are the unit options for the template file that I want to copy to other files :

Here are the unit options for the file to be processed :

But here's what I get after processing my file through CopyOptions :

So " Base Units", the " Length of the double dimension " remains in " cm " instead of " mm " and in " Mass/Section Properties", the " length " remains in " mm " instead of " cm "

I looked at INTEGRATION and changing a standard of design to the effect that it only applies to drawings. This requires a *.sldstd file.
How can this file be generated and is it applicable to PART and/or ASSEMBLY files?

1 Like

To generate the sldstd file, here from a part for example:


Then for the Integration rule,
Under Conditions, Solidworks and Systematics
In Rules, Documents and then change the Skin Standard

For copyOption it's strange, maybe @fmarchand will tell us if this is the normal behavior or if all the options should have been copied but there is a small bug.

To be tested, but I'm confident!

2 Likes

I just did a trial with copyoptions and it works fine.
Base units and mass/section as well.
I'm working on SW 2022 SP5 and mycadtools 2022 SP2

1 Like

@Le_Bidule : We tried again several times, on different positions and always the same problem. We are in the same versions as you... Strange.

@sbadenis : We switched to INTEGRATION, which allows us to perform more functions. We didn't go through Load a dressing standard, because it wasn't working.
Here's what we did:

Basically, in step 1 we switch the units to CUSTOM mode
In step 2, we modify the units field by field
and step 3 we added 2 custom properties

Below is the link that allowed us to understand the update of the units with the codes corresponding to the possible choices:

As well as the document that inspired us for our INTEGRATION functions:

4 Likes

Hello

I made a small macro to change the units of a file (via macro recording).
You should be able to make your own macro and run it in batch via a visiativ tool.

Yes, with Integration it is possible to launch a macro in various modes.
But if it works with changing the options what more could you ask for.
The macro will not be faster than integration because it also uses APIs just like macros (only the language changes, Vba for macro and other for Integration)
And yes, Integration is very powerful, you can do a lot of things with it, and when I can't do what I want, I develop a small macro that I run with Integration for Batch processing.

2 Likes

Hi all

We have not had any feedback on a problem with CopyOptions and the " Length of the double quote" option.
In addition, I did a test on my side and I didn't manage to reproduce the problem...

Do you have an example file to provide us?

Kind regards

1 Like

Hello @froussel : I also have a macro that does this.
I'm also going to test via Batch or Integration.
It can be interesting to run several macros in a row :+1:

Hello @fmarchand ,
Below are the settings of my CopyOptions as well as the 2 files, the template and the file to be processed.

00-COPY OPTIONS TEMPLATE. SLDASM (28.2 KB)
00-TEST CHANGE UNITS. SLDASM (32.0 KB)

Hello @sbadenis
Through integration, we managed to change the units and add properties.
But we can't get all the configurations to be rebuilt so that we have all the mass values up to date for all the configurations, for example.
Here is what we get after processing Integration:

And here's what we would like to have without having to go through solidworks by launching " rebuild all configurations ":

There is a " Rebuild each configuration " operation in Integration, but it apparently doesn't work for our problem
image

Is there a specific way to do it?

For the time being, I have never tested this part of rebuilding the configs via Integration.
You can test this macro by launching it from Integration. Unless you find another solution or why it doesn't work in Integration.
Enable all configs.swp (33.5 KB)

1 Like

Hello @MLG ,

Which version are you on?

I tested with your files and I don't reproduce the problem, the options are copied well.

Kind regards

Hello;

In integration (and on a lot of Visiativ utilities), the configurations are managed in the tool's options: (see excerpt from the help below)

Depending on the options chosen, nothing may happen.

Kind regards.

Hello @fmarchand ,

we are on MycadTools 2022 as well as for Soliworks and PDM.

Hello

In this case, I'll let you update your myCADtools because the problem is not present in this version.

Kind regards