hexagon logo

Tip object

Hi,

I am trying to get A angle of tip for script.

From help:
"Tip.A
Returns the A angle of the tip. Read-only Double."

I have no clue how to retrieve data. How I can A angle of current tip?
Parents
  • I have a similar function for what is likely a similar purpose... Smiley

    In VBA:

    Function NegativeTip(name As String) As Boolean
    Dim Temp() As String
    Dim Angle As Integer
    Temp = Split(name, "A")
    Temp = Split(Temp(1), "B")
    Angle = CInt(Temp(0))
    If Angle <= 0 Then
    NegativeTip = True
    Else
    NegativeTip = False
    End If
    
    End Function
Reply
  • I have a similar function for what is likely a similar purpose... Smiley

    In VBA:

    Function NegativeTip(name As String) As Boolean
    Dim Temp() As String
    Dim Angle As Integer
    Temp = Split(name, "A")
    Temp = Split(Temp(1), "B")
    Angle = CInt(Temp(0))
    If Angle <= 0 Then
    NegativeTip = True
    Else
    NegativeTip = False
    End If
    
    End Function
Children
  • Thanks, nice piece.
    I do understand logic of this function and it looks better than my piece of code. From other hand I do not use any single function in my scripts and I didn't have any working function and that is probably because when I started programming I didn't have any success on creating functions. At this time I'm nearly running out of ideas and when I will run out of ideas then I will start optimisation of scripts then I will try functions again.
  • Paste this into your module and try calling MsgBox AngleA(Cmd.GetText (ID, 0)) . You REALLY should use functions in anything that isn´t trivial. It´s not difficult either, if you´ve failed it´s just some minor syntax error.

    Function AngleA(Name As String) As Integer
    Dim Temp() As String
    Temp = Split(Name, "A")
    Temp = Split(Temp(1), "B")
    AngleA = CInt(Temp(0))
    End Function