VS:SetClassN: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
(fix example with wrong syntax)
 
Line 48: Line 48:
<sample>
<sample>
<code lang='vs'>
<code lang='vs'>
PROCEDURE Example(h : Handle);
{ select an object on drawing }
BEGIN
SetClassN(FSActLayer, 'Class Name-1', FALSE);
SetClassN(h, 'Class1', false);
</code>
END;
RUN(Example);</code>
</sample>
</sample>



Latest revision as of 14:05, 25 December 2017

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure SetClassN assigns a class to the referenced object.

If the third parameter 'descIntoGroup' is set to true all objects within the group will receive the same class assignment as the group,
otherwise only the group itself will be affected.

PROCEDURE SetClassN(
h :HANDLE;
class :STRING;
descIntoGroup :BOOLEAN);
def vs.SetClassN(h, class, descIntoGroup):
    return None

Parameters

h HANDLE Handle to object.
class STRING Name of class to assign to object.
descIntoGroup BOOLEAN Assign the same class to all objects inside the group.

Example

{ select an object on drawing }
SetClassN(FSActLayer, 'Class Name-1', FALSE);

Version

Availability: from Vectorworks 2018

See Also

VS Functions:

VS:SetClass

VS Functions: [[VS:SetClass]]