Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dimension text rotation

0 views
Skip to first unread message

Sean Bartleet

unread,
Jan 29, 2003, 10:25:13 PM1/29/03
to
Hi,

When I create a dimension in a UCS that is rotated around the Z axis
relative to the world UCS, my dimension somehow reads the UCS and gets
the text rotation correct. As in the text is upright when read from the
bottom
and the right of the page relative to the UCS.

When I create a dimension in World UCS the dimension text can be "upside
down" relative to the rotated UCS. Is there a way to update existing
dimensions so that they read the correct UCS for the determination of the
dimension text rotation.

I cannot find a UCS like property in the property dialog. How does the
dimension know what UCS it was drawn in? Where is this stored. Can I change
this using VBA? Or do I have to delete and redraw all the dimensions.

I have been exploring the dimensions properties in VBA. If I change the
dimension block I cannot seem to update the dimension text. Using the code
below the .Update under With blkMyBlock.Item(5) does not update the text. If
I use entMyEntity.Update this resets the entity text to <> and changes the
rotation back to 0.

If I use the code below to change the dimension text, and perform a manual
regen the text changes. If I then manually rotate the text in AutoCAD the
Dimension text changes back to <>.

What am I missing. Where is the dimension stored? in the blocks collection
or in the ModelSpace collection? If I want to change the text should I be
changing the *D? block or something else?

Getting back to the original question how does the dimension know what UCS
it was created in and therefore know which side of the line to put the text.

Sub TestGetDimBlock2()
Dim entMyEntity As AcadEntity
Dim PickPnt As Variant
Dim ContextData As Variant
Dim TransMatrix As Variant
Dim blkMyBlock As AcadObject
Debug.Print vbCrLf & "XXXXXXXXXXXXXX"
ThisDrawing.Utility.GetSubEntity entMyEntity, PickPnt, _
TransMatrix, ContextData, "Select Destination Text"
' Find an object from a given objectID
Set blkMyBlock = ThisDrawing.ObjectIdToObject(entMyEntity.OwnerID)
With blkMyBlock.Item(5)
Debug.Print .textString
.textString = "\A1;xxx"
.Rotation = Pi ' Note that the text may _
not always be item (5), will depend on type of dimension, _
cycle through items testing for text
.Update
End With
' entMyEntity.Update ' this resets the entity
End Sub


Any assistance will be appreciated.

Thank you.

Sean Bartleet


0 new messages