Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly material macro 4

Status
Not open for further replies.

sorg

Mechanical
Jun 10, 2002
13
0
0
US
Does anyone know of a source for a macro or program that will:

Change part materials from within an assembly for a part or a selection of parts to a material selected from a drop down list. An option would be a macro that had a single material hard keyed to the macro. In that case we could have several macros, one for each material that we typically specify.

I can do some slight tweeking of existing macros, but am not a programmer.

Thanks in advance!
 
Replies continue below

Recommended for you

We have an add-in that is part of a larger toolset. It changes several properties and works either in parts or from assenblies. (At least color, density and material). I don't know if our guru will be willing to extract the code and let me post it for you. He is kinda busy right now and we would have to check on company intelectual property rules to post it verbatim. Shame sometimes, but big companies have these rules and we don't get much discretion to make exceptions - for good reasons I suppose. It is probably similar to TheTick's, so you could probably just extend that.

BTW: Tick - hope you got my email with his email address. You two could share SW programming ideas and problem solving without the above issues.

I was - and he did. So at least I didn't get coal.....
OK, OK, It's a reference to my holiday sig. "Be naughty - Save Santa a trip..."
 
CorBlimeyLimey,

In SW2004 I have tried changing materials in the assembly context, but the change does not propigate to the part. I am aware of the ability to select the materials from the drop down list when in a part, but I need to do it from the assembly level (this is a mandated requirement). If it IS possible to do from the assembly please provide some slight guidance on the method that works for you.

Thanks

Bob Sorg
 
sorg
I have had very limited access to SW04, but you should be able to easily edit the material of parts within an assy.
Open the assy, RMB the part & select "Edit Part", then RMB the Material icon & select "Edit Material". You should then be able to select from a drop down list. When you do a resave of the assy, the part will be updated to your selected material.
If you do not want the part to be updated you will have to create material configurations of the part & simply change to the pre-configured part in your assy.
You can probably also change the material of individual parts by a DT, but I have not had chance to try that yet.

Hope this helps.

[cheers]
CorBlimeyLimey
Barrie, Ontario
faq559-863
 
I am using SolidWorks 2001+ and have written a macro that might help, there is a lot of other things on there that will not be of much use. the material bit though assigns a material and changes the part model colour.
 
We don't do it "in-context". Our custom code actually changes the part files from inside the assembly However I believe it can temporarily change them in the assembly file - but I've never used that bit.

I was - and he did. So at least I didn't get coal.....
OK, OK, It's a reference to my holiday sig. "Be naughty - Save Santa a trip..."
 
Thanks CorBlimeyLimey. I am aware of that method. My particular dilemma is that the person that directs my activities is very specific in what he wants to see (one click and the part material changes). The problem compounds in that he is not a heavy user of the program.
 
Thanks Tug,

Perhaps your macro would be of help. We are using SW2004 but it may work anyway. I would appreciate it if you would forward a copy to the address indicated in my personal profile.

Perhaps some of the other things that are "in there" could benefit us also.
 
Tug,

The address should be accessable now. I did not have a check box set.

Sorry for the inconvenience.

Bob Sorg
 
Tick,

I added your website to faq559-520.

[cheers],

Scott Baugh, CSWP [borg2]
CSWP.jpg

faq731-376
 
Status
Not open for further replies.
Back
Top