Skip to content

Latest commit

 

History

History
67 lines (56 loc) · 1.18 KB

File metadata and controls

67 lines (56 loc) · 1.18 KB

NameObject

Description

Procedure NameObject assigns an object name to the next object created.

PROCEDURE NameObject(objName : STRING);
def vs.NameObject(objName):
    return None

Parameters

Name Type Description
objName STRING Name to be assigned to object.

Examples

VectorScript

NameObject('Part 5257');
Rect(0,2,2,0);

On Vectorworks 2009 the function have problems with groups (BeginGroup and EndGroup). In order to workaround the problem use this (SetName call):

BeginGroup;
Rect(0,2,2,0);
EndGroup;
SetName(LNewObj, 'Part 5257');

Python

BEGIN {There is no sketch Folder}
	NameObject(kRedlineSketchFolderName);
	BeginFolder;
	EndFolder;
	SketchFolderHan := GetObject(kRedlineSketchFolderName);
END;

BEGIN
nameobject(foldername_s);
BeginFolder;
EndFolder;
folder_h := getobject(foldername_s);
END;

BEGIN
	NameObject(getLocStr (16520, 12));
	BeginFolder;
	EndFolder;
END;
vs.NameObject('Example')

Version

Availability: from All Versions

Category