Jump to content
Developer Wiki and Function Reference Links ×

ObjectVariable for Text Dimension Offset?


Recommended Posts

Do any of you have a way of getting the "horizontal" offset of the dimension text along a linear dimension?

 

ObjectVariableReal of 44 from the appendix seem like it should be what I need, but it always returns zero.

 

I want to uncheck the Autoposition dimension (ObjVar 29 I believe) and then move the dim text to the "far" end of the dimension.

 

But I can't find the right way to do it.

 

Thanks.

Link to comment

@Pat Stanford I have been playing around with GetObjectVariableReal 44 and I think that I have the answer for you.  If the dimension text has been manually moved, ObjVar 44 will return a percentage value of where the text is along the dimension line (0 if all the way to the left, 1.0 if all the way to the right, 0.5 at center).  If you move the dimension text outside the bounds of the dimension line, you start getting outputs that don't make a whole lot of sense.

 

If the text hasn't been manually moved (ObjVar 29=TRUE), ObjVar 44 will return 0.

 

EDIT:

After actually reading your post all the way through and what you are trying to do, this code worked for me.

PROCEDURE MoveDim;

PROCEDURE DoTheThing(h:HANDLE);

	BEGIN
		SetObjectVariableBoolean(h,29,FALSE);
		SetObjectVariableReal(h,44,1);
		ResetObject(h);
	END;
	
BEGIN
	ForEachObject(DoTheThing,(SEL=TRUE));
END;

Run(MoveDim);

 

This code moves the text to the far right side of the dimension, changing the ObjVar 44 to 0 will move it to the far left side.

Edited by Jesse Cogswell
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...