Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

center of gravity

Mihail

New member
Hellow !


I like to use the "center of gravity" as a regular SW point. For example, to define a reference plane as PARALLEL PLANE AT POINT where "point" is center of gravity.


Is it any way to do this in SW?


Thank you in advance !


Mihail
 
Uff. No one can help me ?!


SW "know" whereCENTER OF GRAVITYis. Somewhere, in SW's mind,must be this variables. But WHERE and how I can "ketch"them to usein my calculations ? How I can define a simple equation like:


MyVariable = CGx (CENTER of GRAVITY on X axix)


If I can do that, the rest become.


Thank you again !


Mihail
Edited by: Mihail
 
Open your document (assembly or part), go to File > Properties.


You see a "summary Information" dialog; under "Property Name" column make a variable such as CG_X, then under "Value / Text Expression" column, you should get an arrow for pull-down menu; choose "Center of Mass X"


Repeat for Y and Z.
 
Thank you for reply SSLaser.


But see my first question please (the first post): I like to use CENTER of GRAVITY point as a regular SW point.


My really problem is to define a plan paralel to FRONT plane and through CENTER of GRAVITY point.


I make a variable CG_X (how you teach me) but I am not able to use this variable in a equation. Something is not ok. I think that the type of this variable must be a number but SW do not allow this type.


So, if I change the part, the center of gravity is changed too andit is necesary to update manualy the position of my plane, and, of corse, I like very much to avoid this work.


Thank you again ! More ideas ?


Mihail
 
How Rimma ? How I make a sketch relation using this point (CENTER of GRAVITY). I am looking for a way to automaticaly reposition a plane or a sketch when CG is changed.


Thank you (to all) for replys.


Mihail
 
You can use the following MACRO to insert a POINT at the center of gravity. AND because this inserts a "MACRO FEATURE" in the treeit will rebuild the point and update the location of the point if you change the geometry of the part.


Hope this helps !!


-Randy
 
I can't figure out how to ATTACH the macro file for you !?!?
smiley7.gif
 
Hey Randy,

I'd be interested in that MACRO as well. If you click on the ICON that looks like a diskette, all the way on the right of the top row of ICONS in the "Post Reply" dialog, you should be able to upload the file. Alternatively, you could just "copy 'n paste" the code here in the forum and we could "copy 'n paste" it back out.

If that doesn't work, please send the code to me as well, THANKS
smiley20.gif


JoeLewinski-at-gmail-dot-com
 
Sorry Mihail, I was away on travel all last week, so I didn't see this thread until now.


I though I had a solution, but there is a problem with my approach. Can anyone tell me if thisis a bug? I'm using SW 2007 SP3.0. I addedto the procedure from my previous post,with the modification in bold:


Open your document (assembly or part), go to File > Properties.


You see a "summary Information" dialog; click "Configuration Specific" tab; under "Property Name" column make a variable such as CG_X, then under "Value / Text Expression" column, you should get an arrow for pull-down menu; choose "Center of Mass X"


Repeat for Y and Z.


Continue with this:


Click OK to accept and close the dialog box.


If your part does notalready have an Excel-based Design Table in the tree, add it now.


Right click Design Table in the FeatureManager tree. Click "Edit in New Window." You should be presented with an "Add Rows and Columns" dialog box. In you should see listed under "parameters" something like $PRP@CG_X,click it and click OK. Go to the Excel spreadsheet.


One of the columns should be labeled $PRP@CG_X with a value under it for the first listed configuration. You can now manually add the dimension name to the column next to it, and set the cell under it equal to the cell with the CG value in it (type something like "=J4" not the actual value).


Close the spreadsheet. You may have to regenerate the part. If the plane still doesn't move to where its supposed to, open the excel sheet again.


So this is what's preventing this from working: I was not able to get the spreadsheet to update with re-opening it; therefor the dimension doesn't update. Does anyone else experience this? I think this is the one thing keeping this approach from working.
smiley5.gif



Peter
 
Thank you Peter.


I do not try yet, but I think is resonable what you say. After I try that I inform you about the results. But, before that, is necesary to learn more about DT.


Thank you again !


Mihail
 
It puts the point in but after running the macro and then clicking on any feature, I'm put into a sketch andcan't cancel out... "A change has been made to sketch feature which cannot be cancelled." I have to close the part to get out of it. FYI, I'm running SW2007 and this has happened on two different parts, one being a simple cube. Any thoughts?
 
I found that it's asking me to constrain the point (i.e. dimension it). On my cube, I had tofully dimension it (3 dims). Once that's done, everything's OK but then the point position doesn't update as the design changes.
 
burnsp,


For the point to update, you'll need to make a macro feature that will refresh every time the model is rebuilt. I did have a plan to try to make something like that, but found that macro features are harder to implement than the average macro for whatever reason.
 
Thank you Matt !


Can you (or others)tell me where I can find VB for SW ? I edited the macro you post and I try to understand it, but the HELP menu is a general help for VB. It has not the specific instructions like PART.with amember list added.
Edited by: Mihail
 

Sponsor

Back
Top