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!

Dynamic Annotation's Location 1

Status
Not open for further replies.

Eurobum

Aerospace
Aug 20, 2001
27
0
0
US
Hello All,

I would like to make my annotation, located in the center of a rectangle, on a 2D drawing to relocate when I modify one side of the rectangle.
Any guru in VBA can give me few little hints, please. TIA.
 
Replies continue below

Recommended for you

Chris,
I create an annotation with the text like "Front Panel". Every time that I change the dimension of the rectangle I have tomove the text manually to fit in the center of the rectangle. I hope you understand what I mean. Thanks.
 
You have not said if on the part or on the dwg.
Either way, you can add some sketch centerlines attached to the text location "point" and the rect, dim the lines, hide the dims.
Or use a Design Table.

Chris
Systems Analyst, I.S.
SolidWorks 06 4.1/PDMWorks 06
AutoCAD 06
ctopher's home (updated 06-21-06)
 
Where can I find the text location point?. Or if I can create the point that link to the text or textbox then it will solve the problem. Thanks.
 
Are you specifically looking for an API/VB answer?

If a 'geometry' answer is acceptable, it will depend on the answer to the question asked by ctopher (twice) ... which, by the way, you have ignored.

If the annotation is in a 3D model part in the form of text in a sketch, the position can be kept central by drawing a line in the sketch which is constrained to the edges of the rectangle, using the line as the guide curve for the text and using the Centre Align option. (See Sketch Text in the help files)

If the annotation is in a 2D drawing view in the form of a note, then we'd need to know what the "rectangle" you refer to is.

[cheers]
 
Sorry guys, I do not ignore your questions. In my very first post, I did mention that I'm dealing with the 2D drawing and the rectangle which I refered to is a 2D rectangle on which I have to specify to my customer as "Front Panel" and on the back side as "Back Panel".
I made the design table to import the dimensions from Excel to Solidworks. It works fine except after the changes I have to move those texts manually to the new location.
The annotation does not have a coordinate or node that I can assign a relationship or dimenison to the drawing (maybe I don't know how).
If you could show me the way to link the text (i.e. annotation) to one side of the rectangle then I can assign a dimension or make a point then create a relationship with my rectangle.
I'm sorry for my explanation but english are not my strong point. Thanks.
 
OK, we understand that you have a 2D drawing, but we don't know what you are showing in the views on that drawing.

Is it a 2D rectangle drawn in a sketch in a drawing view? Is the text added to the drawing view? Is the text just the title of the drawing view? (Like Front View, Side View, Plan, etc)

or ...

Is it a 3D rectangular part with the "Front Panel" and "Rear Panel" cut-extruded or scribed into it using the Sketch Text" function? If it is this one, see my first post for a solution.

No need to apologise for your English. It is far better than my version of your language.

[cheers]
 
It's just a text added in a drawing view and it's not related to any dimension. The Front Panel here is to indicate something like the front side of the bag of potatoes chip etc...
 
This will work. ->

1. Smart dimension between the mid-points of the sides of the rectangle in the drawing (any two sides will do) - make sure center dimension text is turned on.

2. Delete the Dimension Text <DIM> and replace with the text required (Front Panel)

3. Move the dimension to the approximate center of the rectangle in the other (non-centered) direction.

4. Right click on the dimension and go to properties/display and uncheck display extension lines and dimension lines.

5. Also make sure that this dimension is driven instead of driving.

Viola... you have a note which always re-locates to the center
 
Mr. Pevac ... Please another question ... Is there any way that I can rotate the dimension text from 0 to 180 degree?. Thanks.
 
Say you need the text to be vertical. You will have to dimension two midpoints on the horizontal lines (up and down) and right click on the line - properties/display and click override standard dimension display and choose the third option (in line with the dimension line).

This should work for other then 0-90 angles as well.

I just thought of another way to do what you are asking...
You could make a block with your text and add a point which you can constrain (coincident relation) to a virtual center (constructed on a hidden layer).
 
Dr. Pevac, you do know that Solidworks inside out. I did try the first suggestion and it works nicely. With the second suggestion I don't know how to make the virtual center but I'll play around until I'll get it. I really appreciate your help.
 
Dr Pevac.. I like that :) hehe! Thanks.

When I say virtual center.. I just mean some construction geometry that you put on a hidden layer. For example, construct a diagonal line with a point in the middle of it. This will be the middle of the rectangle and stay associative to it.

 
Status
Not open for further replies.
Back
Top