mostafa Posted August 6, 2021 Report Posted August 6, 2021 (edited) hi everyone how can i create a menu like a pic that i attached to this topic?. in other word in citect scada in run time mode i want to by clicking on the button a menu just like a pic i attached to this topic is appeared. anyone can help me how should i do? which cicode functions i should use for it? can anyone has a example code for this? Edited August 6, 2021 by mostafa
slimskism Posted August 18, 2021 Report Posted August 18, 2021 You can make them at the top of the page using the menu configuration options (at least in Citect 2015). But do you want one to open from a button somewhere on a page? What version of Citect are you using?
slimskism Posted February 24, 2022 Report Posted February 24, 2022 Hi, Just found this, you can use the DspPopupMenu function. You then need to use Cicode to do stuff with the menu options, but calling DspPopUpMenu(-1) will return which option was chosen. Below is some example code taken from one of our projects. The StrGetField function is not a built in function but it just returns an item from a comma separated list. FUNCTION DropdownTrendMenu(STRING sDisplayNames, STRING sPavNames) INT i = 0; INT iMenuOption = 0; STRING sPav = ""; OBJECT hProcessAnalyst; DspPopupMenu(0, sDisplayNames) iMenuOption = DspPopupMenu(-1); IF iMenuOption > 0 THEN sPav = StrGetField(sPavNames, iMenuOption, ","); IF sPav <> "" THEN IF FileExist(PathToStr("[Run]:" +"\Analyst Views\" + sPav + ".pav")) THEN PageDisplay("ProcessAnalyst"); SleepMS(200); hProcessAnalyst = ObjectByName("AN206"); CSV_PA_LoadPavFile(hProcessAnalyst, sPav); _ObjectCallMethod(hProcessAnalyst, "SynchroniseToNow"); END END END END
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now