Confused on Dimension with Negative Value

jshial
Advocate
Advocate

Confused on Dimension with Negative Value

jshial
Advocate
Advocate

Hi community,

 

I tried to create dimension between a grid and a void. 

 

Steps:

1. Create ReferenceArray;

2. Create reference for grid;

3. Retrieve reference from void by GetReferenceByName.  (I named few reference planes inside family editor, for example, "Left", "Right")

4. Append references.

5. Retrieve curve geometry from a line.

6. Document.NewDimension(current_view, line, ref_array, dimension_type)

 

But the dimension is not showing. When I query its ID, it always has negative value 304.8 mm (1 feet, internally).

 

I have setup a demo model with the void family inserted. See image below for the direction of grid and void. f => facing direction, h => hand direction. In this case, I used "Front" reference from the void. FaceFliped and HandFliped are both false, there was no mirroring or reflection. So I believe "Front" is the correct reference.

 

jshial_0-1636016725868.png

 

Appreciate any help on this.

 

 

 

0 Likes
Reply
Accepted solutions (1)
389 Views
2 Replies
Replies (2)

RPTHOMAS108
Mentor
Mentor
Accepted solution

There is a slight out of squareness from grid preventing it being dimensioned. If you are having issues with dimensions it is a good idea to check it can be done in the UI first.

 

After correcting the error below I was able to dimension with the API as you set out. This below I would count as an insignificant error because it is in the hundredths of a mm range but Revit cares it seems.

 

You can check in UI the below by drawing a detail line along the edge and dimensioning from grid to end points.

 

In terms of end user interaction I think typically for these kinds of things notifying is better than correcting i.e. correcting may make other dimensional references invalid (although that in itself would indicate out of squareness between datums).

 

211104.PNG

0 Likes

jshial
Advocate
Advocate

@RPTHOMAS108 Good point as always, thanks Thomas!

0 Likes