Macro to insert the = symbol on each side of a dimension

Hello

 

I know it's not standardized, but in my shop they use this type of quotation "= <DIM> =".
I cobbled together a macro with what I found on the internet to automate this but I would like it to be reversible, i.e. I can remove the = without having to edit the dimension.
And now I'm drying.

If anyone can take a look

Thank you

 


Txt.
3 Likes

Hello 

Could you give us your code please =)

 

3 Likes

This is the txt file.

3 Likes

ah dsl ^^ 

I'm watching it tonight =)

2 Likes

Hello

What do you mean by "without having to edit the dimension" because if you make another macro by replacing only the lines:

'New Dimension Text
sNewPrefix = "= "
sNewSuffix = " ="

by:

'New Dimension Text
sNewPrefix = ""sNewSuffix
= ""

This allows you to remove the = = on the selected dimension.

Otherwise, you can also make a macro that analyzes all the dimensions of the plan and removes the = = on all those that contain them, the attached code allows you to analyze all the dimensions of the plan and to extract all the information of them in an Excel file, with that there must be a way to tinker with something quickly.

Kind regards


anotation_plan_solidworks.txt
3 Likes

Otherwise you can use the quote favorites...

http://help.solidworks.com/2017/french/SolidWorks/sldworks/t_adding_a_style_to_a_document.htm

3 Likes

Hello

I modified your macro a little normally, now you can put your preffix (or suffix) and if they are already there, the macro removes them. I hope it will be useful to you in your shop.

Dimitri


macro.txt
5 Likes

@d.Roger:
Thanks for your macro! By "without editing the dimension" I mean not having to go to the dimension text and delete the == by hand, and I didn't want to do a second macro because I wanted to do everything from a single button.

@max59:
It doesn't work because the side style takes into account the type of tolerance (absolute, fit, symmetrical..)

Thank you all for your help!

2 Likes

I really like the error message:)

1 Like