Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Center of Gravity + Equation = positioning of point.

Status
Not open for further replies.

tummen

Mechanical
Jan 16, 2007
37
I have searched google and this forum for a solution but all answers go to the same bad solution of creating a macro that you update.
I DO NOT WANT TO USE A MACRO.
So now the real issue.
In an equation i can set a value to something according to CoG.x, y or z.
I can create a 3D sketch and insert a point. if i add a dimension to this point from Origo and then control the meassurement in a equation all is well until values go negative. is there a way of setting the x y z values of a point in a sketch. I know how to create a new point in a sketch this is not an option since it will not relocate other geometry bound to the old point.

I cant find any named reference to a point to use but in the menu i can hand enter x y z so it should be possible...
 
Replies continue below

Recommended for you

I had an unrelated but similar situation where I needed to control a point in space and going negative was a challenge. I ended up creating a set of offset planes outside of my range of motion. I located the point relative to those offest planes. That way the dimensions are always positive. I controlled everything with a design table, so my offset plane dimensions could easily be added to the formulas.

-Dustin
Professional Engineer
Pretty good with SolidWorks
 
Hi, tummen:

If you don't want to use a macro, maybe you want to use a macro feature.

What are you going to do with your CG? Do you have an example?

Best regards,
 
We constantly make parts where we need to use the CoG as a reference in geometry.
Sometimes we use it to draw a line from the lifting point to CoG to verify that it will hang straight.
But a macro has to be manually triggered, and all macros i have seen nakes a new point every time so it is double bad for me.
 
Howdy,
The problem you are having may be related to the fact that SolidWorks Planes don't recognize a positive and negative side (all dimensions are displayed as positive. If you try to cross over the Plane from one side to the other the dimension is still a positive number (you can't control which side of the Plane your on). Positive numbers are usually a good thing (especially for dimensions on drawings). With the help of others I have discovered a way around this using a sketch points Coordinates (x, y, z) and Driven Dimensions, but, so far it only works with SW 2010 x32.

Are you using SolidWorks 2010 x32 in Windows XP?



Tobin Sparks
 
No we use SW 2011 SP2 on XP32 + Vista 64 bit + Win 7 64bit systems.
What was your solution?
 
Hi, tummen:

Someone named Jim Sculley created a nice macro feature for CoG. This feature is what you need. This is not a regular macro, but rather it is a macro feature. The CoG will get updated automaticallly when models (parts or assemblies) change. You can download it from the link below:


I like it, and I hope you will too. There is an SPR for this feature (SPR182287, from Solidworks).

Best regards,
 
Howdy tummen,
I have just built around Jim Sculley's macro feature method. Automatically adding Driven Dimensions from the Origin/Planes to the CofG point. The point is updated at each rebuild (Ctrl + Q) and is unaffected by which side of the Plane the C of G ends up on. The Driven Dimensions are well just driven along. My macro also adds custom properties to the model that can auto-update a table on the drawing. I have no way of testing to see if it will work an any of your SW 2011 systems. Sometimes its just a matter of copy and paste the code into a macro started in your particular computer environment.

Read the CofG.txt file for important Preconditions.

Enjoy

Tobin Sparks
www.nov.com
 
 http://files.engineering.com/getfile.aspx?folder=5086f098-2f33-4080-9119-ddeb15e279b9&file=CofG.zip
Status
Not open for further replies.

Part and Inventory Search

Sponsor