Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro Writing... Could somone knock this up? 1

Status
Not open for further replies.

m4rc

Mechanical
Jan 25, 2005
112
Hi,

I realise this is a little cheeky, but it's less than a month until I start my new role and I need to get as much done in my present role as possible. Some might ask 'why bother, you're going to a new job?', as it's within the same company I don't want to let them down and do nothing for the final month... :)

Anyway, enough of that cr4p. My problem is with Family of Parts. At this company we have a lot of products that have a base set of dimensions, then the customer has a specific shaft size and we machine the product out to suit. This creates a lot of detail drawings, so we use FoPs. But here's the problem, when you populate out a FoPs the part members have no mass until you go to Physical Properties and press the Update button. As I'm the one creating most of these to start with (from 2D tabulated drawings) is it easy for someone (and here's the cheeky bit) to write a macro that does the following?

- I select and open up the file,
- I press a macro button,
- The part gains a mass (macro updates physical properties)
- The part gets saved and closed
- I move onto the next file...

Feel free to flame me :)

Cheers,

M
 
Replies continue below

Recommended for you

Hi M,
A quick suggestion here -
Are the parts all the same material ?
If so create a template part model and do the initial calculation for the mass props.
Once this has been done, delete the body from the model. and update again.
Now, when you create export a family member model use this as the template.
When you have created them use the OpenSave routine that comes with Solid Edge and the mass properties will update.
I haven't tried this so can't be sure it will work, and I realise it doesn't help with existing stuff.

bc
 
Hi Beachcomber. I've tried what you suggested but the mass still does not update in the family member file. It does open and then save each file in term, but as for updating the mass it misses it :(

I'll try again, maybe I'm missing something. Ah well... enhancement request coming up!

Cheers,

M
 
Hi M,
It must be that when the new file for the family member is created the mass has to be initially calculated as for any new part and only when this has been done will a Save force an update.
I tried modifying the OpenSave routine to do the job, but I have VB Express 2005 (free download from Microsoft).
When I open the original VB code it converts to the new format and gives me a load of errors that I don't have the knowlege to correct.
If I get time I'll try and do something, but don't hold your breath as I'm back to work tomorrow after 7 weeks off.

By the way, don't know if you read my post on the multi-replace part macro, but I HAVE got that working. There are a few 'glitches' that I don't know how to correct, but it does what I want it to.

bc

 
Hi M,
Just another suggestion for you.
Create a new assembly file and drag in a load of the family member parts.
Then try using 'Physical Properties Manager" to assign material/density to each part. I think this should update each one.

bc
 

..yes this will work but do not forget to SAVE the
assembly after you've finished otherwise the parts
will not get saved. The assembly can be deleted
afterwards.

dy
 
Hi,

Thank you for that it really did work just fine! The only thing that I spotted that was different was the non displaying of the Triad... I cannot work out why it's not though.

M
 
then get into Tools --> Optiones --> View there is an Option
to show/not show the orientation triad. Maybe it's OFF

dy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor