News:

Please note new Forum URL: forum.designcad.com

Main Menu

Problem with macro

Started by Gymbo, March 30, 2025, 03:19:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gymbo

I have a drawing that gets text entered from a macro. It has worked for several year (just reinstalled Window 10 and upgraded to DesignCAD 2D 2022).

Error: A disk file could not be opened.

Have several screen shot that I can't seem to Insert, I guess I need help there too.
Regards,

Jim

Rob S

First off, check that your Macros folder in Options, options, file locations in fact points to the correct folder where this macro can be found.

As to attaching screenshots, look below your message compose window for "Attachments and other options" and look for "Choose file" button.   Up to 4 Jpg's of reasonable size can be attached.

User since forever

Gymbo

I've selected 3 .png files. What's with the Insert Image button above the text box? Also Notify me of replies was and is checked, still no notifications.
Regards,

Jim

Rob S

The insert image button allows you to insert a link to an image already hosted on the internet.

The attachments section below allows you to upload images from your pc.

Did you check your location (path) for your macros folder?

I fear that Gmail is known to reject emails from Imsidesign, I dont know why that is.  I will set mine to notify, and then let you know what email address you need to unblock.
User since forever

Gymbo

The path is correct, the macro runs fine, this is the error

I attached 3 .png fine to the previous post
Regards,

Jim

Gymbo

and this is the other picture I sent, part of  the macro that failed
Regards,

Jim

Rob S

#6
So the macro is trying to open a text file located at the specified path - C:\users\...\roaming...., and named "which.txt" and it cant find it or less likely it might be write protected.

Can you confirm that this exact path exists, and contains this text file, and you can open it with say notepad?   Is your windows username still the same after the reinstall??

If not, you can edit the "Path" statement in the macro to reflect where that file actually is.

By the way, the notification came to me from [email protected]
User since forever

Gymbo

I modified the macro to update the user name and actually ran (window key-r) the code (C:\Users\Jim Allen\AppData\Roaming\Gymbo\Puzzles\which.txt) and notepad open up the which.txt file.

I don't know how to unblock and email address in gmail, I'll look it up.
Regards,

Jim

Gymbo

Turns out it was a share issue.
Regards,

Jim

Bob P

Since I have several versions of DC, I have a "universal" folder (i.e. d:\dcmacros) that is available by all. It avoids owner and sharing problems.