custom resources access from Macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

custom resources access from Macro

Postby crashXpert » Thu Apr 06, 2023 9:11 am

Hi,
I'm new both on this forum and on UCCNC.
I'm trying to customize my UCCNC adding/modifying some macros. In one of them, I display a Forms with a custom picture. But I have to put the Full Path of the image. I try to find a way to get a relative path, because if I duplicate my profile, my flashscreen or screens, I don't want to have to edit all macros. I try to find a way to have the full path of the Macros_<profile> directory by code, but I failed. System.IO.Directory.GetCurrentDirectory() give the root directory from where the UCCNC shorcut is started.
Did someone find a way to compute by code in macros a Path for custom resources (and not put the full path in clear) ?
Hopping my question is clear.
Thanks
crashXpert
 
Posts: 1
Joined: Thu Apr 06, 2023 8:48 am

Re: custom resources access from Macro

Postby dezsoe » Thu Apr 06, 2023 11:20 am

Use e.g. Application.StartupPath + @"\Screens\".
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to Macros

Who is online

Users browsing this forum: No registered users and 10 guests