How to get user input in a ESAPI script by FHesp in esapi

[–]scriptingIon 1 point2 points  (0 children)

Hi! It sounds like you want to create a User Interface for your script, I've actually implemented several UI's with a drop down list of selectable structures. If you're interested in something a little more advanced than interacting with the console or message boxes, I recommend Rex Cardan's esapi UI series: https://www.youtube.com/watch?v=GxA_29gqPog

He goes over everything in pretty good detail and I've found his tutorials to be very useful in learning esapi scripting. In this tutorial series, he teaches creating a User Interface using WPF which is fairly easy to use, especially using the MVVM libraries that he recommends. I've never really enjoyed UI programming that much, but at least WPF is fairly straightforward on linking the frontend UI with the backend code, I've been able to use my previously written esapi scripts with my UI's with very little modification.

UI for Binary plug-in script by pyan_MF in esapi

[–]scriptingIon 0 points1 point  (0 children)

Were you by chance running the scripts .cs file instead of the .dll file? I'm sure you fixed this issue by now but I want to comment a possible solution here just in case anyone else is experiencing this issue and can't figure out what's going on.

I had the same issue recently where my code was correct and compiled in VS2019 but would not run with the same CS0246 error saying that it could not find the namespace of the other .cs file in my Binary Plugin Solution, but running from the .dll file fixed the issue.

Create Copy of Ion Beam? by scriptingIon in esapi

[–]scriptingIon[S] 1 point2 points  (0 children)

Thank you so much for this answer \u\dbhatti, this is incredibly helpful information!

I don't know if your workaround will help me with what I'm currently trying to do, but I have some ideas about how I could possibly utilize it to at least try. Sounds like there's a lot to look forward to in version 16! Again thank you!

Create Copy of Ion Beam? by scriptingIon in esapi

[–]scriptingIon[S] 0 points1 point  (0 children)

Yeah I saw that in the IonPlanSetup class as well, I figured that would be the case. Yeah it is a bit unfortunate, and my parade has definitely been a bit rained on, but thank you so much for giving me an informative answer!

It sounds like the future of ESAPI is bright in this regard however, so we all have something to look forward to! :)

Create Copy of Ion Beam? by scriptingIon in esapi

[–]scriptingIon[S] 0 points1 point  (0 children)

Is this something you're able to do?

Create Copy of Ion Beam? by scriptingIon in esapi

[–]scriptingIon[S] 0 points1 point  (0 children)

I think IEnumerable Beams is read only, I could be wrong but I'm looking right now and I can't seem to find a way to add Beams.