Difference between revisions of "VS:VM SelectSimilar"

From VectorMEP
Jump to navigation Jump to search
m
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:VS:VM_SelectSimilar}}
 +
 
== Description ==
 
== Description ==
 
Procedure VM_SelectSimilar enables you to select similar objects based on your active selection. The purpose is to be able to quickly select objects of the same type.<syntaxhighlight lang="pascal">
 
Procedure VM_SelectSimilar enables you to select similar objects based on your active selection. The purpose is to be able to quickly select objects of the same type.<syntaxhighlight lang="pascal">
 
PROCEDURE VM_SelectSimilar();
 
PROCEDURE VM_SelectSimilar();
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
<!--
 
== Parameters ==
 
== Parameters ==
 
<dl><dd><table cellpadding="2" border="0"><tr>  <td valign="top">h</td>  <td></td>  <td valign="top">HANDLE</td>  <td> </td>  <td valign="top">Handle to layer.</td></tr></table></dd></dl>
 
<dl><dd><table cellpadding="2" border="0"><tr>  <td valign="top">h</td>  <td></td>  <td valign="top">HANDLE</td>  <td> </td>  <td valign="top">Handle to layer.</td></tr></table></dd></dl>
 +
-->
  
 
== Remarks ==
 
== Remarks ==
Line 11: Line 15:
 
== Example ==
 
== Example ==
 
<syntaxhighlight lang="pascal">
 
<syntaxhighlight lang="pascal">
PROCEDURE MoveToLayer;
+
PROCEDURE SelectSimilar;
VAR
 
    h : HANDLE;
 
 
BEGIN
 
BEGIN
    h := NIL;
+
     IF VerifyLibraryRoutine('VM_SelectSimilar') THEN
    {h := GetObject('LayerName'); in case of predefined layer}
+
        VM_SelectSimilar();
     IF VerifyLibraryRoutine('VM_MoveToLayer') THEN
 
BEGIN
 
IF (GetType(h) = 31) OR (h = NIL) THEN VM_MoveToLayer(h);
 
        End
 
 
     ELSE
 
     ELSE
         Message('The routine VM_MoveToLayer is not available.');
+
         Message('The routine VM_SelectSimilar is not available.');
 
END;
 
END;
RUN(MoveToLayer);
+
RUN(SelectSimilar);
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
== Version ==
 
== Version ==
 
Availability: from VectorMEP 2021
 
Availability: from VectorMEP 2021
[[Category:VS Function Reference:Object Editing]]
+
 
 
__NOTOC__
 
__NOTOC__
 +
[[Category:VS Function Reference:Document List Handling]]

Latest revision as of 04:28, 13 December 2020


Description

Procedure VM_SelectSimilar enables you to select similar objects based on your active selection. The purpose is to be able to quickly select objects of the same type.

PROCEDURE VM_SelectSimilar();

Remarks

All objects should be compatible. In case of selecting an object based on a type definition, similar type instances will become selected.

Example

PROCEDURE SelectSimilar;
BEGIN
    IF VerifyLibraryRoutine('VM_SelectSimilar') THEN
        VM_SelectSimilar();
    ELSE
        Message('The routine VM_SelectSimilar is not available.');
END;
RUN(SelectSimilar);

Version

Availability: from VectorMEP 2021