Skip to content

Latest commit

 

History

History
71 lines (57 loc) · 1.58 KB

File metadata and controls

71 lines (57 loc) · 1.58 KB

NameClass

Description

Creates a new class in a VectorWorks document, which then become the active class. If the specified class already exists, then it will become the active class of the document.

Note: Class names cannot exceed 63 characters.

PROCEDURE NameClass(className : STRING);
def vs.NameClass(className):
    return None

Parameters

Name Type Description
className STRING Name of class.

Examples

VectorScript

NameClass('Revisions');
Rect(4,4,6,6);

{Create a class 'Revisions' in the document}
{The rectangle is then assigned this class }

Python

BEGIN
	IF IsTextureableObject(hobj) THEN BEGIN
		IF Name2Index(ClassName) = 0 THEN BEGIN
			activeClName:= ActiveClass;
			NameClass(ClassName);
			NameClass(activeClName);
		END;

BEGIN	{ Main }
	{DselectAll;}
	{IF SetUpObject( gPluginName, gPluginH, recordH, wallH, saveClass, noneClass ) THEN}
	{BEGIN}
		IF kUseContainerClass THEN NameClass( GetClass( gPluginH ) );

BEGIN
CurrentClass:= ActiveClass;
NameClass(PartClass);
NameClass(CurrentClass);
END;
if objType == 94:
	vs.NameClass( className )

if vs.GetTypeN(h) == 94:
	vs.NameClass(className)

See also in tutorials: 01. Draw a Room with Walls, 07. Set Up Document Structure: Layers and Classes, 20. Read a Polyline and Build Walls Along Its Path

Version

Availability: from All Versions

Category