Getting "Text" z axis position from a ipt file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help???
I have the following function, in a VBA module, that extracts a text strings height, string,x,y,z and rotation angle.
All works fine, except for "z".
I need to know the origin of the text in the "Z" axis.
Can anybody tell me how this can be done?
Public Function WriteDxfTextEntities(Doc As PartDocument, sketch As PlanarSketch) As Boolean
Dim sketchEnt As SketchEntity
Dim ViewVector As UnitVector
Dim sketchNormal As UnitVector
Set ViewVector = GetViewVector(Doc)
Set sketchNormal = sketch.PlanarEntityGeometry.Normal
If sketchNormal.IsParallelTo(ViewVector) And sketchNormal.IsEqualTo(ViewVector) Then
For Each TB In sketch.TextBoxes
TextString = Trim(TB.Text)
If TextString <> "" Then
TextHeight = TB.Height * 10
DeltaX = TB.Origin.x * 10
DeltaY = TB.Origin.y * 10
Rem DeltaZ = TB.Origin.z * 10 ****THIS IS THE PROBLEM LINE****
DeltaW = TB.Rotation * Rad
Msgbox DeltaZ
End If
Next
End If
End Function
Many thanks in advance!!!
IsoCAM