// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 24.Jan.2002 // // // // // // addAttributeEditorNodeHelp(string $nodeType, string $helpCommand) // // // The Attribute Editor's Help menu creates menu items // for node types that it is currently displaying. For custom // node types use this procedure to specify a help command // to be invoked when the custom node type menu item is // selected. // // // string $nodeType The node type. // // string $helpCommand The command to display help for the node. // This command is invoked when the corresponding menu item is // selected from the Attribute Editor Help menu. Specify an // empty string to prevent the menu item for the node type // from being created. // // // Nothing. // // // // // Prevent a menu item in the Help menu from being // // created for nodes of type "customNodeType1". // // // addAttributeEditorNodeHelp("customNodeType1", ""); // // // Use the showHelp command to display a specific web page // // when the "customNodeType2" Help menu item is selected. // // // addAttributeEditorNodeHelp("customNodeType2", // "showHelp -absolute \"http://www.alias.com\""); // // // Use the print command to inform user no help is available // // for "customNodeType3". // // // addAttributeEditorNodeHelp("customNodeType3", // "print \"No help available yet for customNodeType3\\n\""); // // global proc addAttributeEditorNodeHelp( string $nodeType, string $helpCommand) { global string $gAttributeEditorNodeTypeArray[]; global string $gAttributeEditorHelpCommandArray[]; int $count, $index, $length; $length = size($gAttributeEditorNodeTypeArray); // Determine if the argument node type is already in the // array. // $count = stringArrayCount($nodeType, $gAttributeEditorNodeTypeArray); if (0 == $count) { // // Not in array yet. // // Add node type and help command. // $gAttributeEditorNodeTypeArray[$length] = $nodeType; $gAttributeEditorHelpCommandArray[$length] = $helpCommand; } else { // // Already in array. // // Find index of node in array. // for ($index = 0; $index < $length; $index++) { if ($nodeType == $gAttributeEditorNodeTypeArray[$index]) { break; } } // Update help command. // $gAttributeEditorHelpCommandArray[$index] = $helpCommand; } }