AutoCAD CUIX: Swapping my LISP routine’s mapped drive URL link in my Macro with the Google Share Drive web based link of the same file - url

My LISP routines are on the Google Share Drive at my work. I have buttons in my custom ribbon that calls my routines using a mapped drive letter URL link.
URL Link example in my custom Macro:
Goal:
Trying to share this with the other CAD users in the office.
Problem:
Various CAD Users have different mapped drive letters (Ex: H:\ or S:\ instead of G:).
Trying to avoid going around and manually changing the drive letter to match their mapping every time I updated the CUIX file (since path would be overwritten).
Would like to use the universal Google Share Drive web based link (by selecting the file and choose "get link" in Google Drive and copy the link).
The Swap:
Current URL Mapping in my Macro example (if image above not showing):
^C^C(load "G:\shardrive\CAD_Department\CAD_menu\LISP\My_routine.lsp");My_routine;
Example of swapping with the Google Share Drive link (not working):
^C^C(load "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ");My_routine;
Another method I tried
^C^C(command-s "_browser" "https://drive.google.com/file/d/0BlU92IihdhhcnRlcl9mWxl/view?usp=sharing&resourcekey=0-0VxGZXU_D8YjtjgjzQZnQ/");My_routine;
Anyone know the proper syntax for the macro?
Thanks in advance!

Sounds like a more configurable approach is needed, where the users can map the drives with whatever path they want (G:, S:\ or whatever). But they can still use the tools that are inside said drive.
To do this there are three things that would help:
1.) start using AutoCAD profiles. It's possible write a setup script to create the profile for the user. This profile would contain a support file path entry for the location of your LISP code. The path would vary depending on where the user has google drive mapped to.
2.) load all LISP from the profile when AutoCAD starts up, this can be done with the acaddoc.lsp file.
3.) remove all hard-coded load statements from the CUI buttons

For the issue I mentioned in my comment above about opening a folder through the CUIX macro only (and not through a LISP routine), I found this possible solution:
^C^C(startapp "explorer" (vl-string-translate "/" (chr 92) "C:/TEMP"));
Credit to Paul_Gander and his comments located here:
https://forums.autodesk.com/t5/autocad-forum/open-a-folder-with-a-button/td-p/3010928
More testing needed but so far so good...
Thank you Paul!

Related

How to allow users to Upload local file, Edit in sheets, and Write back to local file

I'm investigating if it's possible for a user to: Pick a file on disk, automatically upload it to Google Sheets, do some edits, and write the changes back to the file.
I basically want to use Google Sheets as the Editor of the local file.
Has anyone tried something like this, or can confirm if it's a feasible idea?
My rough idea:
Install a script or program, that a user (on our team) can execute with the appropriate file they pick.
Typically they right-click a file and pick "Open with MyGoogleSheetsCreate".
The ToSheets-script does the following:
Generates a temporary Spreadsheet on the user's Google Drive (or possibly a Team Drive/Folder for temp files)
Reads the custom data in the local file and enters it into the Spreadsheet.
Opens a Browser window with the generated spreadsheet.
The user makes some changes to the spreadsheet.
The user exports the changes back to the file.
User initiates this how? Some ideas:
Perferably: I build a button or menu option to "Export back to Local Disk". This would only be viable if we could explicitly say where to save this custom file, i.e. where it came from.
Optionally: They right-click the original file and pick "Open with MyGoogleSheetsRetrieve". The importer would need to know the address of the Google Sheet the local file was last exported to.
FromSheets-Script converts the Spreadsheet into our custom data format and overwrites the old file.
Bonus: The temporary Google Sheet would be automatically moved to the Bin within a couple of days (without user interaction).
I think I've got a good idea of how to convert our custom format to Sheets and vice versa. The steps I'm most unsure of are: 3.1 and 5.1

IDA Pro: Reverse-Engineering Temp Storage

In the executable I am reverse-engineering, there are several references to a path in my D:\ drive. However, I do not have a D:\ drive connected. Is it possible that it creates a temporary storage site in the executable?
For example, there is a string:
D:\BuildAgent\...\bin\...\fileIWantToSee.jpg
IDA even believes that the symbol information is in the D drive, and attempts to look for it, to no avail. There are many instances of file references within these strings, and many of them end with a:
Line: **LINENUMBER**
Where would I go about trying to find where this storage is located? Thank you!
EDIT: Could it be in a specific section?
Is it possible that it creates a temporary storage site in the executable?
This is possible. There exists at least one product (http://www.boxedapp.com/, kind of our competitor :) that lets the application create such container -- the calls to file APIs are intercepted by the code added to the application by this product, and this added code handles specific paths in a different way (emulating file operations), letting all other calls go to Windows API.

Add link to open a local file in Google Docs

I have made a guide (or something like a tutorial) about my tool to share with my company. I used Google Docs to do that, and I would like to add links to open video guides. I want to know a way to add link in the document.
What I do is the following. Links in sheets ( or in your case Docs) only respond to internet protocols e.g. HTTP://, HTTPS:// and so on... . It does not respond to file explorer protocols (like excel or word does) e.g. file:\\ or C:\.
So I installed WampServer (any other server will do as well, I just use this) and then copied the files into the WWW folder.
Now you can link to files that way. Google Docs/Sheets accept links to localhost as acceptable files to establish a link.
Be aware, your server will have to be online for the links to work. But this is how I solved my problem without uploading items to the cloud that I want to keep private and still use in google docs.
This is just for my local computer, if you want to share the doc with others in a local environment a little more understanding of your local server operations will be needed (i.e. do not use localhost, but refer to your IP-address).
The server can be scale-able on your local network as well, at this point a little more education will be required.
However, if you want to share the doc with others around the world this will not work at all
What I do is upload the files on Google Drive, and post the shareable link on Google Doc. Works like a charm!
Try Redirector.
It's simple Chrome/Firefox add-on for redirections. You can add before your path "http://" - Google Doc will be OK with that, then just configure redirection rule in addon. Rule can include wildcard or regular expression.

open an excel file located on the server instead of download it MVC

I'm building a Reporting web application right now with MVC3 and I've come up to a couple problems.
My goal is to have it able to generate and view Crystal Reports, SSRS reports, and Excel documents.
Right now I'm working on the Excel segment and I'm running into more trouble than I thought I would. First off, when I link directly to the file, it either opens inside the browser or it downloads it from the server and if the user makes changes it doesn't actually save it to the true file on the server.
I've tried both linking to the file directly using Razor and a ViewModel with the path to the document as well as directing it to an action that returned a File.
I've also tried linking it to a shortcut to the actual file thinking that if I could open the shortcut it would open the file the way I wanted it to and unfortunately it didn't really open at all.
The users already have access to the files on the server through a network drive, so as of right now they can go into the server, open the excel document, edit and save it no problem. I want to duplicate this effect through a link. The program already has a file browser built, so I can browse between the files and make links to the reports.
Thanks in advance!
Since they are apparently on a network drive, you can just link to the files directly, relative to the user?
For example: a link to file://///SERVERNAME/folder/
I tested it between two computers on the network, and that seems to work. However, you still get a popup asking that you want to do with the file, open or save. (both in firefox and IE)
Note: Yes, that many slashes seem necessary, lol

iOS file browser example

Does anyone have some sample code demonstrating how to make a "file browser" view? I'd like to be able to navigate through directories and drill-down the sub-directories and see files located within the various folders. I want the user to be able to create new directories/files and even select an existing file. Is there sample code out there already available to do this?
I don't know about sample code, but this wouldn't be too complicated to achieve using NSFileManager and a UITableView.
You can obtain arrays of directory contents using the subpathsOfDirectoryAtPath:error and associated methods of a file manager. These arrays in turn can populate a UITableView. It would be fairly easy to put together a navigation controller that could display a series of table views showing a file hiearchy.
Bear in mind, however, that you'll only be able to access the directories inside your application sandbox, unless you're running on a jailbroken device.
The iOS programming guide says that
You should never present users with the list of files in this directory and ask them to decide what to do with those files. Instead, sort through the files programmatically and add files without prompting.
This is assuming you are trying to implement file browse feature for your documents directory.
I'm an author of FileExplorer which is a file browser for iOS and fulfills most of your requirements.
Here are some of the features of my control:
Possibility to choose files or/and directories if there is a need for that
Possiblity to remove files or/and directories if there is a need for that
Built-in search functionality
View Audio, Video, Image and PDF files.
Possibility to add support for any file type.
You can find my control here.

Resources