Hi John,
> BTW, do you have any documentation on the dxf values in the
"AEC_VARS_DWG_SETUP" dictionary?
Sorry I'm not familiar with those.
Bud Miller
www.BudCAD.com
Try the only Legal Writer that reads parcels directly!
"John Uhden" wrote in message
news:855B59143D3E5B450BBBA056414E8A3E@in.WebX.maYIadrTaRb...
> Well, whadoyaknow. Seems like a pretty useless function relative to the
Utility object. Thanks for the info, Bud.
>
> BTW, do you have any documentation on the dxf values in the
"AEC_VARS_DWG_SETUP" dictionary?
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
>
> "Bud" wrote in message
news:CCFAF8FF20879105FFED13D7A4864586@in.WebX.maYIadrTaRb...
> > This will work with a north rotation of 0 (north straight up).
> > To use it with NR you'll need to get the angle by converting the XY of
the
> > start and end points to North/East.
> >
> > unit = acDegreeMinuteSeconds
> > bearinquest = ent.Angle * (180 / pi)
> >
> > select case bearinquest
> > case < 90
> > bearinquest = Abs(90 - bearinquest)
> >
> > 'similar statements to correct the angle for each quadrant
> >
> > end select
> >
> > bearinquest = ActiveDocument.Utility.AngleToReal(bearinquest, acDegrees)
> > converted = ActiveDocument.Utility.AngleToString(bearinquest, unit, 4)
> > 'convert to min etc
> >
> > --
> > Bud Miller
> > www.BudCAD.com
> > Try the only Legal Writer that reads parcels directly!
> >
> > "John Uhden" wrote in message
> > news:810419FD7A252ED6108C2D18CFF0EFA6@in.WebX.maYIadrTaRb...
> > > Thanks, Glen. We probably all knew that, but my concern was that his
> > interpretation of the angle was w/r/t the drawing's North rotation. I
> > beleive the AngleToString method incorporates that.
> > >
> > > So when is Pipeworks going to let me enter inverts in the tabular
editor
> > without recalculating the whole d____d run? Did you realize that this
June
> > we're coming up on the 10th anniversary of its failure to work
correctly?
> > >
> > > --
> > > John Uhden, Cadlantic/formerly CADvantage
> > > [ mailto:juhden@cadlantic.com ]
> > > [ http://www.cadlantic.com ]
> > > 2 Village Road
> > > Sea Girt, NJ 08750
> > > Tel. 732-974-1711
> > >
> > >
> > > "Glen Albert" wrote in message
> > news:679F3F890E14A4020B7D36618D84409E@in.WebX.maYIadrTaRb...
> > > > It's also fairly straight forward if you want to calc it yourself if
you
> > > > need more control over the string formating. Once you get the
decimal
> > degree
> > > > value, to get the degree portion of the DMS value you convert the
> > direction
> > > > to an integer. This will truncate the numbers to the right of the
> > decimal
> > > > point. You then subtract the Deg value from the decimal degree value
> > then
> > > > multiple by 60 you get the decimal minutes. then repeat the
procedure
> > for
> > > > the seconds.
> > > >
> > > > In this example, the original decDeg is a double, the Deg and Min
> > variables
> > > > are integers and the Sec variable is a double to carry the seconds
> > > > precision.
> > > >
> > > > deg = Int(decDeg)
> > > >
> > > > decDeg= (decDeg- Int(decDeg)) * 60
> > > > min = Int(decDeg)
> > > >
> > > > decDeg= (decDeg- Int(decDeg)) * 60
> > > > sec = RoundVal(decDeg, 0))
> > > >
> > > > ' check for values rounded to 60
> > > > If sec >= 60 Then
> > > > sec = sec - 60
> > > > min = min + 1
> > > > End If
> > > > If min >= 60 Then
> > > > min = min - 60
> > > > deg = deg + 1
> > > > End If
> > > >
> > > > ' format the strings
> > > > sDeg = CStr(deg)
> > > > If sDeg = "0" Then sDeg = "00" & sDeg
> > > > sMin = CStr(min)
> > > > If Len(sMin) = 1 Then sMin = "0" & sMin
> > > > sSec = CStr(sec)
> > > > If Len(sSec) = 1 Then sSec = "0" & sSec
> > > >
> > > > sDMS= sDeg & "-" & sMin & "-" & sSec
> > > >
> > > > This gives the azimuth. If you want bearings you first need to get
the
> > > > correct quadrant and angle.
> > > >
> > > > Glen
> > > >
> > > > "John Uhden" wrote in message
> > > > news:6CCA4AD1BA04E7219FC98360C26B9C2B@in.WebX.maYIadrTaRb...
> > > > > I just stumbled on an almost undocumented "AngleToString" method.
I
> > don't
> > > > know VBA but it's used on the
Aecc.Application.ActiveDocument.Utility
> > > > object...
> > > > >
> > > > >
> > > >
> > > >
> >
> >