Syntax
DrawGetType([Count])
Remarks
Returns a number corresponding to the type of the drawing object specified by Count. Count is in the range 1 to DrawCount(), the number of objects within a range specified by DrawSetRange. If Count is omitted, the type of the selected drawing object is returned.
DrawGetType() returns the following values.
Value | Explanation |
0 (zero) | Count is not specified and a drawing object is not selected. |
1 | Count is not specified and more than one drawing object is selected. |
2 | The drawing object is a line. |
3 | The drawing object is a text box. |
4 | The drawing object is a rectangle. |
5 | The drawing object is an ellipse. |
6 | The drawing object is an arc. |
7 | The drawing object is a freeform shape. |
8 | The drawing object is a callout. |
Example
This example sets the drawing range to the entire document using the predefined bookmark " \ Doc," counts the number of arcs in the document, and then displays the result in a message box:
DrawSetRange "\Doc" numarcs = 0 For i = 1 To DrawCount() type = DrawGetType(i) If type = 6 Then numarcs = numarcs + 1 Next MsgBox "The document contains" + Str$(numarcs) + " arc(s)."
See Also
DrawCount(), DrawSelect, DrawSetRange