DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Many macros won't play after computer restore - how to fix?

Started by samdavo, July 09, 2013, 04:51:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Many of my macros have been wiped out after a recent trauma in my computer (which required "restore to previous date").

By way of preamble (totally optional reading) ...  What happened (totally weird) was that two days ago, my computer decided it wouldn't open a stack of programs, (like Word or Excel etc) and, all the icons on my desktop wanted to open one program only.   With the assistance of Norton's helpdesk, I was told that:-
a) nothing to do with viruses, but
b) the only way around it was to restore the computer to a previous date (the previous day) when it was operating ok.  I wasn't aware of this feature of Microsoft Windows, apparently Windows 7 and 8 and other versions - but it seemed to sort out the problem - AT LEAST AT FIRST impression.  I thanked the nice lady in that I could open all programs again.

She had uninstalled my DesignCAD V22 during this operation, but goingback to the previous day reset it.

I found that I had to set a stack of previously sorted defaults (that didn't surprise me).  Including File Locations for instance.  But the problem I have involves macros no longer working.

As an example, I have a very simple macro to mirror the selection about a point (probably a library macro).  It goes like this ...

mirror vertical.d3m  :-
>SetStartPoint
{
  }
>SetHandle
{
  <PointXYZ 0.0000,0.0000,0.0000
  <PointXYZ 0.0000,0.0000,0.0000
  }

>SelectMirror
{
  <PointXYZ 0.0000,0.0000,0.0000
  <Axis 1
  <Type 1
  }

regen

The problem I NOW have is that it no longer works, - instead I am presented with a message
"An error occurred in a DesignCAD command.
File: C:\2000dc\macros\mirror vert.d3m
Line: 1
>SetStartPoint"

That is the correct path to my macro.  However it doesn't want to play for some reason (??)  This is the first time since March 2000 when I wrote (or copied) that macro that it hasn't worked lol.

BTW,  this is now happening with a stack of my macros (??)  They all present a message that Line 1 or 2  or whatever isn't recognised (?)
Any tips or advice would be appreciated.

I enclose a screendump of what I get ( trying to draw a drilled hole by mirroring the half-hole - to end up like the one above the selection).

PS I have another macro that loads a symbol.
It has a similar error statement
Line: 1
>SelectLoad
(?)

samdavo

PS F1 Help doesn't want to work either (?) - blank response to F1 key.

Supplementary question... What is the best location for "Executable"? 
Talking Options\File Locations now.
cheers
sam

(I'm starting to suspect an uninstall and re-installation might be in store :) )

minstrel

Quote from: samdavo on July 09, 2013, 04:51:19 AM
She had uninstalled my DesignCAD V22 during this operation, but goingback to the previous day reset it.
This is quite a 'pickle' you got yourself into...

...here's some ideas...

My advice is to re-install DCad...if it was uninstalled prior to the restore, the restore will/may not heal all the missing files. So some things are probably missing.
 
No doubt the macros are fine...so that's the bright side.

And after you get it all setup and working properly be sure to make backup copies of all dcad .ini files for future 'pickle'events...and back them up regularly.

All Success,
Minstrel

Lar

There was a problem with macros not running in v22. Can't remember exactly what the solution was, one of the ini files had to be replaced or something. The solution is posted on the forum somewhere.

Lar

minstrel

Could also be a part of the problem, but if he's missing the help files as well then the DCad installation is most likely corrupted.

Minstrel

prl

Sam,

Sorry to hear about the trouble(s).  Nothing I can offer as an easy solution but maybe some ideas and suggestions.

Sometimes DesignCAD (all of them) crashes and there are dirty DCADXX.exe phantom processes still in memory.  That will screw up trying to launch another version and can result in odd keyboard and macro behaviors.  Ctrl Alt Delete and search through the running processes. Sometimes I spot phantom versions of Word or other programs too.

Hopefully you are keeping your macros in a safe separate directory.  I keep mine on my D drive (D for data, isn't that clever).  It is backed up often.  And all my versions of DesignCAD read the same macro directory. In a last ditch "SOS" requiring a reinstall, those type of separate directories for macros, ini files, etc. are very helpful.  Biggest hassle is setting the various file paths but you can do that too by storing a copy of your DC_FilePath.ini file(s).

And finally, sometimes Windows itself gets so "confused" it is time for a cold reboot (and a cold Fosters).




Lar

Sam, try a macro that does not contain a dcad command (ie, a line that starts with ">") and see if it runs.
'Eg:

message "Number of entities in drawing =", sys(9)


I remember there being a problem with macros that have dcad commands but I can't remember the solution for it.


'Lar

DrollTroll

Normally that message indicates the absence of either macrocmd.ini or Dc3MaxCmd.ini, or both.
25 years with DesignCAD

samdavo

wowo - thanks for the multiple responses gents. (minstrel Lar prl DT)
( as I note when I get up at 5.30 not expecting anyone to stray into this part of the forum and trip over my post for a week or so) .   I really appreciate the responses - as well as this forum incidentally.  I find it so much more fulfilling than discussing politics for instance - but I digress :)

Yes I will uninstall and reinstall, - and keep the ini's ina separate backup location -  D for dementia, (or maybe dope), in my case :)    PS maybe that's why they call them ini's?

Lar I have another simple macro, and you are right, it works fine.
I add it at the end because it is arguably a distraction.  I call it "2.dcm".   And it works fine.

More importantly though, what is the relevance of "File Locations\Executables" please.

Final comment.  I suspect I have problems with other programs as well. 
rats!  shinbone!  all of the above! lol.   Maybe Restore isn't the panacea I hoped for.

As George Bernard Shaw said in his play Back to Methuselah: "Life is not meant to be easy, my child; but take courage: it can be delightful."
Anyway thanks again.
'macro 2.d3m sets current layer to 2 (only), current colour to red,
'and that also applies to cursor, point, rubberband, etc
'(which provides immediate reinforcement that only layer 2 is being selected
'but selection = dark purple

'colour to red
sys(300) = 255 'red
sys(301) = 0 'green
sys(302) = 0 'blue

layer(2)=6
layer(2)=14

for j=0 to 255
layer(j)=2
next j

'only locks 255 layers

'cursor to red because all but red layer 2 are locked
sys(331)=255
sys(332)=0
sys(333)=0

'point to red
sys(312)=255
sys(313)=0
sys(314)=0

'rubberband to red
sys(306)=255
sys(307)=0
sys(308)=0

'set selection rubberband to red
sys(324)=255
sys(325)=0
sys(326)=0


'but retain selection to purple
sys(315)=130
sys(316)=0
sys(317)=255 


Dr PR

Sam,

Just a wild guess here ...

You have generated a prodigeous number of images in your posts, and these eat up storage space. How much free space do you have left on your hard drive?

Phil
DesignCAD user since 1987

samdavo

Phil
Lol - I'll take that one on notice -  as much as I appreciate the lateral thinking ...
or I'll take the reference to the number of posts here as a pisstake, lol - probably justified true :)
about 400 GB m8, - enough for about half a battleship :)
cheers.

PS but remember the days eg Commodore 64 when 64kB was a big memory? - these days a single photo is 4MB!?

PPS The girl at Norton - who remotely restored my computer - sounded pretty smart - and it even had her scratching her head (2 cents)

andrew_neil

I also think you must check your hard drive for empty space.You can do one thing install your DesignCAD V22 into the other drive than the default OS.Then run your macros.Check the results.
Thanks.

samdavo

Thanks Andrew;
Apologies, I should have posted an update on this one.
Basically I simply had to reinstall DCAD 22.1.    :)

Let's face it, Windows "restore" is an extremely traumatic experience for any computer.  Powerful true, and very handy,  i.e. restore things to "yesterday - when all my troubles seemed so far away".  But likewise traumatic.

The original problem was also the weirdest damned thing - all icons on my desktop were the same (??) - but old history now.

Perhaps I wasn't clear in the previous post - but there was(and still is) 400GB free on my hard drive, and about 100GB used - round numbers.
Cheers
sam