×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Assembly material macro
4

Assembly material macro

Assembly material macro

(OP)
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!

RE: Assembly material macro

SW2004 already has this built in....sounds like a good time to push for an upgrade


CorBlimeyLimey
Barrie, Ontario
FAQ559-863

RE: Assembly material macro

I have an addin that changes densities of parts from assembly context.  Contact me vie the email address in my profile if you are interested.

Regards,
Tick

"Great ideas need landing gear as well as wings."--C. D. Jackson
http://www.EsoxRepublic.com

RE: Assembly material macro

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..."

RE: Assembly material macro

Yes I did.  Thanks much.

Big things a-brewin' in Tick's cottage.

RE: Assembly material macro

(OP)
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

RE: Assembly material macro

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.


CorBlimeyLimey
Barrie, Ontario
FAQ559-863

RE: Assembly material macro

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.

RE: Assembly material macro

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..."

RE: Assembly material macro

(OP)
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.

RE: Assembly material macro

(OP)
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.

RE: Assembly material macro

Sorg,

I don't know where to access your email

RE: Assembly material macro

(OP)
Tug,

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

Sorry for the inconvenience.

Bob Sorg

RE: Assembly material macro

I posted the macro version of the assembly density manager addin on my website.

http://www.EsoxRepublic.com/freeware

You can customize the material inputs in the subroutine InitMats in the form frmDensityManager.

"Great ideas need landing gear as well as wings."--C. D. Jackson
http://www.EsoxRepublic.com

RE: Assembly material macro

TheTick,
        Very nice written macro.
Thank you,

Bradley

RE: Assembly material macro

Thank you, Scott!

"Great ideas need landing gear as well as wings."--C. D. Jackson
http://www.EsoxRepublic.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources