Giter Club home page Giter Club logo

Comments (4)

vijaygit02 avatar vijaygit02 commented on July 23, 2024

Hi Anders,

The argument type 'data' is a dictionary which has the few keywords defined in it which are made available at run time to be used in any of your custom function. Have you referred to page 7 in MDCS documentation present under Documentation folder??

if you wish to return multiple values from your custom function , you can return those values instead of "True"

e.g. return val1,val2

Hope this helps.

Best Regards,
Vijay

from mdcs-py.

anpe00 avatar anpe00 commented on July 23, 2024

Thanks the for the respons Vijay,
I have read the documentation but I still don’t understand. ☹
I have built a custom function that is checking whether or not a mosaic dataset exists. Since I do not understand how to return the answer to my calling bat-file (or powershell script) I have to write the answer to a file and then open that file to get hold of the value.
How can I return the answer in a better way? Is the data['response'] a way of doing it.
Do you have an example?

from mdcs-py.

vijaygit02 avatar vijaygit02 commented on July 23, 2024

Hi Anders ,

Apologies for the late reply.
If your objective is to somehow return the answer back to the batch file , I can suggest using sys.exit() .
So if the mosaic doesnt exist then you exit out the program with sys.exit(0) error.
This error can then be used using "errorlevel" inside your bat file.
data['response'] would not be ideal in this case.

Hope this helps.

Best Regards,
Vijay

from mdcs-py.

abhiataero avatar abhiataero commented on July 23, 2024

@anpe00 did the suggestion from @vijaygit02 resolve the issue

from mdcs-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.