0% found this document useful (0 votes)
473 views3 pages

APDL - Chapter 2 - Adding Commands To The Toolbar (UP19980820)

This document discusses how to add frequently used commands and macros to the ANSYS toolbar for easy access. It describes how to define abbreviations using the *ABBR command or menu items, which create buttons on the toolbar that execute the associated command or macro. These abbreviations can be saved to a file and loaded in future sessions. Additionally, abbreviations can be "nested" by defining buttons that load other files containing more abbreviations, allowing creation of customized toolbar menus.

Uploaded by

Mohammad Althaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
473 views3 pages

APDL - Chapter 2 - Adding Commands To The Toolbar (UP19980820)

This document discusses how to add frequently used commands and macros to the ANSYS toolbar for easy access. It describes how to define abbreviations using the *ABBR command or menu items, which create buttons on the toolbar that execute the associated command or macro. These abbreviations can be saved to a file and loaded in future sessions. Additionally, abbreviations can be "nested" by defining buttons that load other files containing more abbreviations, allowing creation of customized toolbar menus.

Uploaded by

Mohammad Althaf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

4/26/2016

APDL:Chapter2:AddingCommandstotheToolbar(UP19980820)

Chapter2:AddingCommandstotheToolbar
GototheNextChapter
GotothePreviousChapter
GototheTableofContentsforThisManual.
Chapter1*Chapter2*Chapter3*Chapter4*Chapter5*Chapter6
YoucanaddfrequentlyusedANSYSfunctionsormacrostotheANSYStoolbar(creatingmacrosis
coveredstartinginSection4.1).[Link]
alias(uptoeightcharacterslong)foranANSYScommand,GUIfunctionname,[Link]
example,MATPROPmightbeanabbreviationforamacrothatlistsmaterialproperties,SAVE_DBis
anabbreviationfortheSAVEcommand,andQUITisanabbreviationfortheFnc_/EXITfunction
(whichlaunchesthe"ExitfromANSYS"dialogbox).
[Link](and
executethemacro,command,[Link])bytypingitatthebeginningofacommandline.
Or,ifyou'reusingtheANSYSGUI,youcanexecutethemacroorcommandbypressingthe
appropriatebuttonontheANSYStoolbar.
Thetoolbar,showninthefollowingfigure,containsbuttonsthatcorrespondtoexistingabbreviations.
Figure21TheANSYSToolbarShowingtheDefaultButtons.

Whilesomeabbreviations,suchasSAVE_DB,arepredefined,theabbreviationsthetoolbarcontains
andthefunctionstheyexecuteareuptoyou.Asingletoolbarcanholdupto100abbreviations(you
can"nest"toolbarstoextendthisnumber).Youcanredefineordeleteabbreviationsatwillhowever,
abbreviationsarenotautomaticallysavedandmustbeexplictlysavedtoafileandreloadedforeach
ANSYSsession.

2.1ModifyingtheToolbar
Youcancreateabbreviationseitherthroughthe*ABBRcommandorthroughtheUtilityMenu>
Macro>EditAbbreviationsorUtilityMenu>MenuCtrls>[Link]
ofthemenuitemsispreferablefortworeasons:
ClickingOKautomaticallyupdatesthetoolbar(usingthe*ABBRcommandrequiresthatyou
usetheUtilityMenu>MenuCtrls>UpdateToolbarmenuitemtomakeyournew
abbreviationappearonthetoolbar).
Youcaneasilyedittheabbreviationifrequired.
Thesyntaxforthe*ABBRcommandandrelateddialogsis
*ABBR,Abbr,String
Where
[Link]

1/3

4/26/2016

APDL:Chapter2:AddingCommandstotheToolbar(UP19980820)

Abbr
[Link]
characters.
String
[Link]
nameofamacro,[Link]
usingmacros,[Link]
(usingUIDL),thenspecify"Fnc_string."Forexample,intheabbreviationdefinitionsfor
"QUIT,""POWRGRPH,"and"ANSYSWEB"shownabove,"Fnc_/QUIT,"
"Fnc_/GRAPHICS,"and"Fnc_HomePage"arealluniqueUIDLfunctionnameswhichidentify
theANSYSpickingmenuordialogboxassociatedwiththeQUIT,POWRGRPH,and
[Link]
functions,seeSection5.6.Thestringyouspecifycancontainupto60charactersanditcan't
includeanyofthefollowing:
Thecharacter"$"
ThecommandsC***,/COM,/GOPR,/NOPR,/QUIT,/UI,or*END
ThedefaultANSYStoolbarhasthefollowingabbreviationspredefined:
*ABBR,SAVE_DB,SAVE
*ABBR,RESUM_DB,RESUME
*ABBR,QUIT,Fnc_/EXIT
*ABBR,POWRGRPH,Fnc_/GRAPHICS
*ABBR,ANSYSWEB,Fnc_HomePage

Forexample,[Link],youwouldenter
thevaluesshowninthefollowingfigureintheUtilityMenu>MenuCtrls>EditToolbardialog
box.
Figure22AddingaNewAbbreviation.

Thenewbuttonisappendedtothebuttonbarasshowninthefollowingfigure.
Figure23TheButtonfortheNewAbbreviation.

[Link]

2/3

4/26/2016

APDL:Chapter2:AddingCommandstotheToolbar(UP19980820)

ToolbarbuttonsarenotpersistentfromoneANSYSsessiontothenexthowever,theyaresavedand
maintainedinthedatabasesothatany"resume"ofthesessionwillstillcontaintheseabbreviations.
Tosaveyourcustombuttondefinitions,youmustexplicitlysavethemtoafilethroughtheUtility
Menu>MenuCtrls>SaveToolbarmenuitem(*ABBSAVcommand)andrestorethemforeach
sessionusingtheUtilityMenu>MenuCtrls>RestoreToolbarmenuitem(*ABBREScommand).
Youcandothisprogrammaticallyinamacro.
NoteIfanyabbreviationsalreadyexistinthenamedfile,the*ABBSAVcommandoverwritesthem.
TheformatoftheabbreviationsfileissimplytheAPDLcommandsthatareusedtocreatethe
[Link],ifyouwishtoeditalargesetofbuttonsorchangetheirorder,youmayfindusing
[Link],thefollowingisthefilethatresultsfrom
savingthedefaulttoolbarbuttons.
/NOPR
*ABB,SAVE_DB,SAVE
*ABB,RESUM_DB,RESUME
*ABB,QUIT,Fnc_/EXIT
*ABB,POWRGRPH,Fnc_/GRAPHICS
*ABB,ANSYSWEB,Fnc_HomePage
/GO

The*ABBcommands(theabbreviatedformof*ABBR)[Link]/NOPRatthetop
turnsoffechoingtothelogfilewhilethe/GOatthebottomturnslogfileechoingon.

2.2NestingToolbarAbbreviations
[Link]
abbreviationsunderonebutton,youcandefinespecializedtoolbars(ifyouhavemanyabbreviations,
havingthemonasingletoolbarcanbecluttered,makingitdifficulttofindtheproperbutton).Tonest
abbreviations,[Link],the
followingcommanddefinesPREP_ABRasanabbreviationthatrestoresabbreviationsfromthefile
[Link].
*ABBR,PREP_ABR,ABBRES,,PREP,ABBR

PREP_ABRwillappearasabuttononthetoolbar.Clickingitwillreplacetheexistingbuttonswith
[Link].
Bydefiningabbreviationstorestorethesefilesandincludingthoseabbreviationsintheappropriate
files,[Link]
[Link]
youimplementsuchahierarchy,it'sagoodpracticetoaddanabbreviationasa"return"buttonineach
filetonavigatebackthroughthemenus.
Gotothebeginningofthischapter

[Link]

3/3

You might also like