Excel Add-In custom Function's dialog box is not working - excel-addins

Our end goal is to share data from custom functions to the dialog box with custom functions runtime in windows excel desktop. The approach we were taking for this was OfficeRuntime.storage, which works in Excel live but not in Excel desktop. We're not sure whether OfficeRuntime.storage data is being passed to the dialogue box or not. Is it possible to pass OfficeRuntime.storage from custom functions to a dialogue box in Windows Excel Desktop?
The way we were setting the OfficeRuntime.storage is in the below image.
set OfficeRuntime.storage
The way we were getting/reading the OfficeRuntime.storage is in the below image.
get OfficeRuntime.storage

Related

Unity inspector unable to save text script

I am trying to edit existing project in unity version 2017.1.3f1 my goal is to change the value of a text script using direct edit from the inspector. However everytime i save the project and run the application the change i have made is not reflecting. Can any one advice me on how to deal with this.
The methods that i have tried
Click the gear icon to load the csharp script but always showing error code
"Unable to open C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll: Check external application preferences.
I have change editor from MONO and Visual Studio but still no luck.
i have attached here some images that can help understand my concern.
RED circle is for the text wanted to change and the gear icon is suppose to leas the code but showing error as mention above
You are using Unity, and therefore the component system. The text is part of the old (deprecated) set of GUI components.
The editor window only allows you to cache the text that will be displayed. In order to load/change text, you need to create a C# script. C# script is added by pressing the AddComponent button, for example. Next, you need to use the Using UnityEngine.UI directive for your component, or TMPro for the Text Mesh Pro component.
If your changes don't show up, it's likely that the project has a system that loads certain texts into your text field. In this case, you need to find out which script is responsible for this.

Is there a way to open any file as text in VS Code?

VS Code is currently my favourite text editor, except for Jupyter notebooks, which are opened as interactive python environments (let's call this 'rendered').
By itself it is nice that this is possible, but not I can live with opening them in a browser if VS Code would not render them.
There used to be a setting to avoid this behaviour ("jupyter.useNotebookEditor": false) but currently my installation does not recognise this setting anymore.
Since there are more file types that can be opened as text/source, or rendered form (e.g. html, md, svg, uncompressed pdf, etc.) and both forms can be usefull, I would be very excited to learn how to switch between rendered and source, preferably without switching global settings.
Is there a way to do this? I would hope for:
a mechanism that does not depend on (or can be overwritten by) the current jupyter extension
a mechanism that works for any file type (nice-to-have)
Are you just looking for a way to view/edit the raw json?
You can right click the file in the Explorer -> open with... -> text editor.
Or use "Reopen editor with text editor" from the command Palette (ctrl+shift+p)

How to create a modal for a VSCode extension?

I'm trying to make an extension for VSCode to Find text in File (Like in Notepad++).
Is there an API for using a modal in a VSCode extension? or at least extend the Command Palette?
VS Code (1.34) has no concept modal UI. Extensions can only show basic dialog messages modally using the showMessage apis.
Messages can show message text and a set of buttons. By default VS Code will render messages in its UI. The MessageOptions.modal option makes VS Code render the message using system UI instead.
Try positing a more specific question about what you are trying to accomplish. VS Code's extension model is different from other editors, so if you are trying to replicate functionality from another editor like Notepad++ you may need to rethink the user experience.
I believe what you are looking for is an input box. It will show a UI where you can input text. From there you can grab the text of a document and parse it for entered text. For completeness, VS Code does this with ctrl + f or cmd + f depending on OS. Add the shift key to search the whole project.
As mentioned above there are the limited built-in inputs and message box (which can also be used to display choice buttons).
You can also have a look at WebView these can be used to display a side-bar view (like the EXPLORER) or a full document. They are made up from HTML and plain old JavaScript. You will have to pass simple string messages between your HTML/JS view and vscode itself.
https://code.visualstudio.com/api/extension-guides/webview
https://github.com/Microsoft/vscode-extension-samples/tree/main/tree-view-sample
A large 'document' view example vscode extension is call 'nearest-icons'
https://github.com/noGreg/nearest-icons

MATLAB GUI Stuck After Save Tool from Guide

I have been working on an gui developed using the GUIDE in Matlab. The current gui, I mean the general figure window contains all types of sliders, buttons, editboxes, etc...
After awhile, I added a toolbar to my gui which included the Save tool. I have not changed any specifications regarding the save tool. I used the one already in GUIDE toolbar editor.
After clicking it, my gui program is stuck at that very instance I pressed the save tool and I cannot do anything else with it. It also opens in the same situation even after restarting the PC. I do not get any errors.
I would appreciate any help. How to restore functionality to my gui?
Unfortunately the "Save" tool's default is not "Save As" with a prompt it is just the normal "save" which immediately overwrites. The tool saved your current figure (or GUI). Meaning it overwrote the fig file of your GUI with the current state.
So when you pressed "save" uicontrol visibility, values, slider positions, edit box text etc. all was written into the FIG file. So the next time you launch it is all still in there.
To Fix it you will probably have to edit in GUIDE and try to clear / reset everything to your desired initial state.

Is there any way to automatize file export operation?

Recently I'm using CorelDraw to create icons for my android application, and I have a little problem. Each icon has to be exported as a png to 6 different sizes, and it is quite annoying to export each icon 6 times. Is there any way to create a macro or other automation stuff that will do for example 6 exports of a file to a dedicated location? All the export settings besides the width and height are the same.
Uses the ActiveDocument.ExportBitmap command to export something as a PNG.
Here is someone over at the corel draw community calling it.
The resolutions are passed as arguments to ExportBitmap. Make a macro that hard codes 6 sizes and exports them to slightly different filenames.
You may not find a free macro as your request on the net. You should ask it to macro developer as it's custom macro.
I got idea for this request.
Macro interface loaded :
a text box for entering png name (or auto numbering)
text boxes for prefix and suffix name (6x)
auto filled file path for each of 6
a button for execute
Select Icon, then click the button. The selected icon will exported to predefined folder with specific name.
i.e :
Prefix_Icon1_48x48.png
Prefix_Icon1_72x72.png
Prefix_Icon1_96x96.png
and so on.
If all your ison is as ONE PAGE only, the macro will available exported each icon as 6 sizes png, WITH auto filenaming function.
Yup, I think it would be as commercial macro.