DR GET ENDMARKS

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR GET ENDMARKS (area; scope; type; point)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-2=Default
-1=All
0=Selected
>0=Object ID
typeInteger1=Arrow
2=Bar
pointInteger0=None
1=Start
2=End
3=Both

Description

The command DR GET ENDMARKS returns into the integer variables type and point, the values defining the endmarks of the lines in area described by scope.

• If scope equals -2, the command returns the default endmarks for new lines.

• If scope equals -1, the command returns the endmarks for all lines in the document.

• If scope equals 0, the command returns the endmarks for the selected lines.

• If scope is greater than 0, it must be equal to a specific line's ID; the command returns that line's endmarks. If the object does not exist, DR GET ENDMARKS returns -32000 for each attribute, and DR Error returns error number 2.

type indicates the kind of endmark on the specified line. Every line has a type of endmark, even though the endmarks may not be displayed.

• If type equals 1, the lines have arrow endmarks.

• If type equals 2, the lines have bar endmarks.

point indicates which ends of the line have endmarks.

• If point equals 0, the lines have no endmarks showing.

• If point equals 1, the lines have endmarks at the beginning.

• If point equals 2, the lines have endmarks at the end.

• If point equals 3, the lines have endmarks on both ends.

If type and point are not the same for all of the lines described by scope, DR GET ENDMARKS returns -32000 for that parameter and DR Error returns error number 29.

Example

The following example gets the ID and the type of the selected object, and if the object is a line, opens an alert that displays which ends of the line have endmarks.

   $Temp := DR Get ID (Area;0;1)   `Get the ID of the 1st selected object
   $Type := DR Get object type (Area;$Temp)    `Get the type of $Temp
   If ($Type = 9)   `If the object is a line
      DR GET ENDMARKS (Area;$Temp;vKind;vPoint)   `Get its endmarks
      Case of
         :(vPoint = 1)   `Endmark at the start
            ALERT ("This line has an endmark at the start.")
         :(vPoint = 2)   `Endmark at the end
            ALERT ("This line has an endmark at the end.")
         :(vPoint = 3)   `Endmarks at the start and end
            ALERT ("This line has an endmark at both the start and the end.")
         Else    `No endmarks 
            ALERT ("This line has no endmarks.")
      End case
   End if

See Also

DR SET ENDMARKS.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next