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

Prime 6 Find and Replace

JonWarriner
4-Participant

Prime 6 Find and Replace

It seems the Replace functionality was improved in Prime 6 to allow you to individually replace in the main text of a variable vs the subscript.  That's great...I guess.  However, it seems in the process they changed the functionality of Find.  Let's say I have a variable like this:

 

JonWarriner_2-1579192913245.png

 

In Prime 5 I was able to find this whole variable by entering the following into the Find box.

 

JonWarriner_3-1579192954531.png

 

In Prime 6 that same search finds nothing.  

I can individually find "text" OR "sub" but I can't find the whole word.  Find doesn't seem to want to cross the boundary between main text and a subscript.  This becomes a huge pain when I want to search for a variable like this:

 

JonWarriner_4-1579193274319.png

 

I can search for "R" OR I can search for "10" both of which are likely used countless places in my sheet.  

 

Is there a trick that I don't know to do a Find that includes both the main text and the subscript?

 

Thanks,

Jon

 

 

12 REPLIES 12

The only trick I know is: Use Mathcad (15, 14, 13, 12, 11) Not Prime.

Other options: Wait for PTC to change Prime such that this kind of searches are supported, along with (potentially) to find 'm' as a unit instead of as a variable.

 

Success!
Luc

FINALLY!

 

I had considered Find/Replace in Prime to be broken.  In version 15 and before it was possible to find and replace only the subscript part of the variable.  The allowed me to quickly do a set of calculations on different sets of data simply by changing the variable subscripts; copy the first calculation block, change the subscripts in the block, et viola!  When I tried that in Prime (until version 6) Prime replaced the whole variable name with what I wanted for subscript only.

 

Sorry, I can't tell you how to search for the whole name--I tried several obvious things that don't work; but I'm glad to see that it can now differentiate between parts of the variable name.

Thanks for the quick response guys.  I figured I was going to be SOL.  

Appears to be the same in Prime 7.0...

 

The horrible find/replace functionality in Prime is a deal breaker for our team. We need the same functionality that's available in 15.0. 

Just for kicks, I also looked a bit into Prime 7 and tried the trick we can use in 15 where you can add the "." to indicate you're looking for the parameter name and its subscript...or even just the parameter name and any of those that have a subscript associated with it...very cool. For example, if you had textsub you could search for "text." and it would find any parameter that had a subscript. Or you could search for ".sub" and it would find any parameter that has the subscript "sub". It does not work in P7 using the "-" character in the same way...another great I/O behavior completely left out of the recipe...

MSheykman
5-Regular Member
(To:JonWarriner)

It was actually a defect that was fixed.

Mathcad Prime only allows to search for strings, but we have an idea to provide search for math expressions and it should also address this use case - search for variable with literal subscript.

Some other related enhancements that we have in mind is "go to definition" and "find usage" of given variable and function.

Mathcad 15 also allowed to search for strings only, but literal subscripts were implemented slightly different and it was possible to search for "variable.subscript".

Meanwhile I can only suggest to use long and meaningful variable names that will be easy to find when your document becomes large or old. It is a well know good practice in computer programming and it can also be helpful here.

 

LucMeekes
23-Emerald I
(To:MSheykman)

"Meanwhile I can only suggest to use long and meaningful variable names that will be easy to find when your document becomes large or old. It is a well know good practice in computer programming and it can also be helpful here."

 

I think there is a BIG difference between mathematical notations (in equations, formulae and other expressions) used in mathematics, physics and related disciplines on one side, and computer program code on the other.

While both must be clear and understandable for their respective readers, the readers of mathematical notations are to be seen as users, while the readers of code are not the users of the computer programs, but (the same or other) coders. Another aspect is the fact that there exists a large portion of common usage (written down in standards: ISO 80000-series) of symbols for mathematical notations: e, pi, sin, but also m, E, U, I, R etc. are generally used in mathematics, phsyics and electronics. E.g. you would really confuse a mathematician if you were to write every occasion of "e" as "BaseOfNaturalLogarithm".

 

Luc

MSheykman
5-Regular Member
(To:LucMeekes)

I totally agree with that and I did not suggest to change names of well known and predefined constants, units, functions. The question and also the suggestion was about naming user defined variables and functions. If you use more than one-two letters to name them the document will usually become more readable and it will be easier to search for it.

 

When you write code you expect that either you yourself will be reading and searching things there, or one of your colleagues will. Usually you can assume at least some basic level of proficiency in software development and the specific programming language from the reader. Same applies to Mathcad documents. You expect some basic level of proficiency in the field, in which you write the document. No difference here.

Prime's "Find and Replace" has been a persistent and frustrating disappointment.

 

One of the many tasks for Mathcad was processing multiple data sets--doing a repetitive calculation on each dataset for comparison (on one plot.)  I easily accomplished this by doing the first set, then copying the computation sequence and changing the literal subscript (usually to the dataset sequence number.)  Mathcad was happy to do this, changing only the subscript. When I try that in Prime, the replace function replaces the whole variable name with the new subscript.  You apparently can only change whole words (string?). not parts of strings.

MSheykman
5-Regular Member
(To:Fred_Kohlhepp)

This is exactly the defect that was fixed in Mathcad Prime 6 as @JonWarriner mentioned in the starting post of this thread.

I humbly stand corrected!

 

Sorry!

MSheykman
5-Regular Member
(To:Fred_Kohlhepp)

@Fred_Kohlhepp , we appreciate your participation in the community. You help a lot of people here.

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."