Macro for Assembly Occurrences Units

Phenom
Phenom

This is in response to this post by Bruce.

I have tried to write a macro that changes the 'Length' units of an assembly and all its occurrence documents.

The macro does not perform any error check, so if it does not seem to work, kindly report here, with error messages if any.

 

The link for direct download is here

 

How to use:

1. Download AssemblyUnits_Executable.piz

2. Change the extension to .zip

3. Extract the .zip

4. Rename the .ex_ to .exe and double-click it.

 

Similarly, the source code for the program is AssemblyUnits_SourceCode.piz so you can change if it does not behave the way you want it to.

 

Hope this solves the query too.

 

~Tushar Suradkar

www.SurfAndCode.in

 

6 REPLIES

Re: Macro for Assembly Occurrences Units

Esteemed Contributor
Esteemed Contributor

Tushar,

 

Thanks. I ran it on a test assembly and the default settings aren't what I need and I don't know how to modify the source code.

 

I appreciate your effort.

 

Bruce

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200

Re: Macro for Assembly Occurrences Units

Phenom
Phenom

Sorry to hear that Bruce.

The macro changes to this unit setting for an assembly and all its occurences:

 

zasm.png

Is that your requirement ? 

 

Can you tell more about 'default settings' you mentioned.

 

~Tushar

Re: Macro for Assembly Occurrences Units

Esteemed Contributor
Esteemed Contributor

My req't is unit: ' - " and precision: 1/16. I guess if I knew how to get into the code I could toggle those things.

 

By default settings I meant your setting of ft - in.

 

Ideally I would like to be able to apply it only to some parts and not assemblies. There seems to be no point to changing units in assemblies anyway as they don't affect the BOM as far as I can tell.

 

 

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200

Re: Macro for Assembly Occurrences Units

Esteemed Contributor
Esteemed Contributor

Marked as solved but...

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200

Re: Macro for Assembly Occurrences Units

Phenom
Phenom

I was getting automated emails from the forum if a solution was found since I had posted this topic, hence I opted to close the thread.

 

I am still on it. After adding the line of code to also change the precision to 1/16, found that it was not working. Subsequently I posted this as a query in the development forum but haven't received an answer. Still waiting for a working solution. Not sure if the line of code I added is wrong or a bug in the Solid Edge API. I have kept my fingers crossed.

 

~Tushar

 

Re: Macro for Assembly Occurrences Units

Esteemed Contributor
Esteemed Contributor

OK. Again I don't want to seem pushy. Actually I don't need it anymore. Of course that could change.

I'm glad you're learning from it though.

Bruce Shand
ST9 MP10 - Insight - Win10 - K4200