josue Corona Posted March 13, 2020 Share Posted March 13, 2020 The following script can create a new class but it only give you the option to name it to fast create, i was wondering if i can add a second line in which i can decide what color fill my class to have? Thank you Quote Link to comment
josue Corona Posted March 13, 2020 Author Share Posted March 13, 2020 {/////////////////////////////////////////// CreateNewClass (c) 2001 Nemetschek North America. Distribute freely. Shows how to create a new class in a document. ///////////////////////////////////////////} PROCEDURE CreateNewClass; VAR newname : STRING; ch : HANDLE; BEGIN { StrDialog() displays a dialog which prompts the user to enter } { a name for the new class being created. } newname:= StrDialog('Enter name of new class:','Untitled Class'); { DidCancel detects if the user clicked the Cancel button. If the } { the user did NOT click the Cancel button, then proceed with performing } { the operations in the code block. } IF NOT DidCancel THEN BEGIN { check to see if the class name is in use } ch:= GetObject(newname); { if the class name is not in use, create the class; otherwise alert } { the user and exit the script } IF (ch = NIL) THEN NameClass(newname) ELSE AlrtDialog('Class name already exists.'); END; END; Run(CreateNewClass); Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.