cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Any way to numerically clear all variables? (Prime)

DJF
16-Pearl
16-Pearl

Any way to numerically clear all variables? (Prime)

The only way I see to do it is to clear each variable individually ..... clear (x,y,z,....)  That can be a lot of typing in a large sheet and you might miss one.  I've had a few situations where I'd like to just clear everything and have a section of my worksheet act individually without any worry of using prior values but without having to relabel everything.    The documentation doesn't point to any solution, but I know there are occasionally undocumented techniques.

Thanks,

5 REPLIES 5
Werner_E
25-Diamond I
(To:DJF)

I fear there is no undocumented feature which would do the trick.

I agree that It would be handy.

S1
8-Gravel
8-Gravel
(To:Werner_E)

Hi!

Is there any update on this old issue?

 

Werner_E
25-Diamond I
(To:S1)


@S1 wrote:

Hi!

Is there any update on this old issue?

 


No. Current version is Prime 9 and there still is no feature like clear(ALL) or the like implemented.
I also can't remember to read that such a feature would be planned for future versions.

Fell free to add an idea in the ideas section of the Mathcad subforum. Personally I have my doubts that it would help and be more than a placebo, but who knows...

MartinHanak
24-Ruby III
(To:S1)

Hi,

maybe it is possible to save Mathcad as text, then use some script to extract all lines containing ":=", then extract variable names from these lines, then generate clear commands.


Martin Hanák
Werner_E
25-Diamond I
(To:MartinHanak)


@MartinHanak wrote:

Hi,

maybe it is possible to save Mathcad as text, then use some script to extract all lines containing ":=", then extract variable names from these lines, then generate clear commands.


Oh yes, this may be possible. 😈

But aside from the fact that we would need someone to write this script/program, I think the question was for a user-friendly way, actually usable in daily practice, where you can just quickly type something like clear(ALL) and start with a virgin calculation in the same worksheet.

Saving the worksheet (it's already zipped XML text, after all), running an external script or compiled program that unzips the file, scans through it and inserts the clear(<list of all variables>) command, and then reopen  Prime and  the worksheet so you can continue working, that's kind of daunting and probably not as user-friendly as I wished for, to say the least ;-).

Announcements

Top Tags