Dimension lines

56 views
Skip to first unread message

Dunk

unread,
Jul 20, 2011, 6:12:25 PM7/20/11
to MetaDraw Developers Group
How do you draw a dimension line showing the actual dimension
information centered on in the middle of the dimension line ie.
<----------15"---------->. Is there a command for this - I can't find
one.

James Lorimor

unread,
Jul 21, 2011, 9:44:15 AM7/21/11
to MetaDraw Developers Group
Disclaimer: I've never used dimension lines, so I'm pretty much
grasping at straws here.

Also, I'm not sure how far along you are in this, but if you look on
page 118 of the MetaDraw User's Guide and Reference, it shows how to
do a LinkLabel. That will tie the label to your dimension line. As
for the length of the line, I'm not sure there's a command for that,
but you can do some geometry to figure that out (using ObjGetParams to
find beginning and ending points of the line) and paste that number
into the LinkLabel....I think?

I'm at work right now and don't have access to Visual Studio, but I
can do some looking later tonight if that doesn't help.

James

Bennet-Tec Staff

unread,
Jul 19, 2012, 1:12:12 PM7/19/12
to metadraw-for...@googlegroups.com
Try creating a text object with the desired information and assigning
this text object as a LinkLabel associated with the Dimension line.
The text in a LinkLabel will automatically move with the Dimension line.
You can also update this text object whenever the dimension line is modified
( for instance in the Change event - look for parameter = resize)
 

 
Note - this question has been answered by Bennet-Tec Support.
Please be aware that we do not normally review this forum or answer posts here.
The MetaDraw Developers Group forum is intended for User to User
communication only. For formal support from Bennet-Te please post
using the Bennet-Tec web site:
       www.Bennet-Tec.com 
       => Click on Support
        => Click on "Submit Support Question

================================

James Lorimor

unread,
Feb 19, 2013, 5:37:58 PM2/19/13
to metadraw-for...@googlegroups.com
OK.  I'm working on adding dimension lines to my little program and I'm having a couple of issues.  I'm using VB 2010.

I add a dimension line (setting it's handle to lngHandle), then I add a text object with some simple settings (setting the text, etc.).  I then do a MetaDraw.LinkLabel setting it equal to CType(lngHandle, ObjHandle).

It works exactly like it should, the text is above the dimension line and follows it around when it is moved or resized.

I have 2 problems though.

First, on page 118 of the manual, it states "After associating a text object as a LinkLabel, the text object will be automatically deleted if the associated Line, Link or Dimension Line is deleted."  That's not happening.  I don't know if I'm not setting the LinkLabel correctly or if there is another problem.

The second is partially related to the first.  Once I have correctly set the LinkLabel, can I select the text object and figure out which Dimension Line it is linked to.  And can I select the Dimension Line and figure out which text object is linked to it?  I've been looking at the LinkObject property, but it looks more like it's used when you link 2 objects (which you can then assign a LinkLabel to), not what I'm looking to do.  Am I wrong?

Any help would be appreciated.

James
Reply all
Reply to author
Forward
0 new messages