Assigned Mass Indication in Solidworks

Hello

Is it possible to have an indication when the mass of the part has been replaced by an assigned mass? either by a color or others.

to know at a glance that the weight is forced

 

2 Likes

Hello

No default solution in SolidWorks as far as I know, but we can imagine creating a macro in VBA.

2 Likes

To avoid overstretching the weight,

It is recommended to eat less bread, eat 5 fruits and vegetables a day, practice regular physical activity, etc. :D

7 Likes

if you have defined a material ref of your library

and that this library is properly populated

The ground is specifically integrated into this part

in an assembly or multibody

it won't do it since 2 subjects 

@+ ;-)

Hello, You need to create a macro.

2 Likes

How do I create a macro for this?

Isn't there one already existing?

Hello,

 

Before you jump into a macro to do that, what is the underlying purpose of your question? (why this question in a way, what should this info bring you?)

 

Maybe there are roundabout ways rather than going through programming;)

Do you know VBA programming?

What kind of message do you want? A popup? A note?

Here's a macro that could work with a popup:

sub masse_assignee 

Dim swMass As SldWorks.MassProperty

if swMass.UserAssigned = True then

msgbox "Attention, the ground has been assigned!"

end if

end sub

Spring:

https://forum.solidworks.com/thread/52375

 

1 Like

The goal is that the person who takes a part with the forced mass is aware by some indication so that this person does not launch the plan with an incorrect mass if he modifies the part (thinking that the weight is automatic as by default)

In your macro, don't forget to create a relationship with your display state that will manage your colors.
Good luck.

1 Like

no I have no knowledge in VBA programming...

for a macro you have to do tools/macro/short then put the text in the editor save then go get it by having it executed? When doing this I always get an error message with your text.PL

1 Like