Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing image in Mathcad - problem 2

Status
Not open for further replies.

mar2805

Structural
Dec 21, 2008
372
Hi folks!
I tried importing an image thats Ive made (jpg and png)
Ive first imported the image in MS Word and from there I selected the image, copy, and then in Mathcad paste.
The image looks ok but most of the "thin lines" that were dimension lines are gone now and MATHCAD "feels slow" now, expecialy when you grav the image and try to move it around the worksheet.
I want to import a graphic of my cross section with its dimensions lines.
How do you do this?
Im using M14.
And the image is basicly creatd inside Autocad, exported as an png image form there and the into MS Word and then to Mathcad.
I tried importing directly autocad file in Mathcad but it reports an error saying that thes no application instaled on my computer?!?
Thanx!
 
Replies continue below

Recommended for you

Did you use "paste special" to insert the pic in Mathcad?
Does those thin lines show up as expected when you load your pic in any other picture viewer - also if you scale it there to the same extent as you do in MC?
The vanish of the thin lines and also the slow behavior of MC after insertion my be due to the fact that the pic itself is very large, being exported at a very high resolution and Mathcad had to resize it. It may help to export at a lower resolution or use a more powerful image processing software to scale down the image to a size that MC can show it at 100% and is not forced to scale the image.
 
Did you use Insert/Picture? Supported graphics formats are BMP, GIF, JPG, PCX, and TGA. If you did, it is possible that the image is so big that you can no longer make it out. If that's the case, reduce the window to a acceptable size and then with Zoom to Window make the picture fit.
 
As I understood the pic should only serve as an illustration, the picture itself would then not needed to be converted into a Mathcad matrix structure. Given that I interpreted it correctly, Insert/Picture would not be the preferred way to insert an illustration.
 
Seems there is a problem when you use a jpg or png since those are not "raster" images.
A collegue of mine whos graphic designer explaind this difference between images created in Photoshop and in programs like COREL.
Anyway I tried with AUtocad application once again and it worked nicely.
I just selected the drawing in autocad , hit copy, opened mathcad and paste as image.
No quality loses even when you scale the image :)
Great.

I dont want to open another thread so Ill ask here.
Is there any way that I can change the font of selected results inside MATHCAD?
Eg. I want few of my resulty in mathcad to be a different font and maybe be displayed BOLD
I tried few things but nothing works.
Everytime I make a change, EVERY result gets updated (in font size and display)
 
Results are all displayed under CONSTANT category.
Problem is that if I change the font of the CONSTANT, everyhing updates.
Is there any way I can create a "NEW CONSTANT" style?
 
You can't format single results different from others, as all resuls would share the Math Style "Constants" and for consistency sake they all look the same throughout, so changing on affects all the others likewise. This applies to Mathcad 15 and below. You can do what you want in Prime3 - but you may not be able to do other things in Prime you want to do because Mathcad 15 and also 14 still are the mch superior versions.
Only way I can think of to make a specific result stand out (other than highlighting or showing a border around the region) is to use a scripted component (Text Box) with no output and one input variable and the fontsize and -color set using VBS.

BTW, jpg and png ARE raster images (and that way may cause the problem) By copy and pasting directly from Autocad you copy a vector graphic image to the clipboard and insert into Mathcad. As mathcad's pasete can deal with vector graphics, too, that way you don't loose the details and size is much smaller.
 
Your right rmix22!

Is it possible that a TextBOX has 2 outputs?
In file attached oyu can see a list from wich you can select and one output value.
Is it possible to assing another output value or you have to make another text box wich will use the input from the 1st text box?
 
 http://files.engineering.com/getfile.aspx?folder=bdd62f39-e6bb-404c-a689-958db761cf25&file=textbox2.xmcd
Yes its is possible. Any component can have as many in- and outputs as you like. The output wikll then be a column vector.
But what do you intend to output additionally? As soon as you know what item the user has chosen, you could calculate all related values more transparent outside the component in in the sheer using normal Mathcad assignments. If you don't want to clutter the sheet with those calculation you may put them into an area and collapse it.

BTW, I think its not the best idea to hardcode the names of the selectable items in the components script. You are more flexible if you provide the component with a Mathcad array containing the list to chose from. Its much easier to maintain that way. And if the component would just return the index and not the item's name, you could use it to set various material properties - just provide am appropriate vector of values and chose the element with that index.
 
A cheap do would be to use ROUND() to round off the remaining decimal places.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
mar2805 said:
How would you formt the units of the text box?
I mean how to round of the number of the result.
As IRSTuff wrote, using a rounding function is what you need. The question is which and how ;-)
I assume you only want the display rounded, not the stored value. Find attached three ways of doing it (I have chosen 3 decimals in the examples):
1) using VBScripts Round() function in the script
2) using Mathcad's simple round() function (it doesn't work with units)
3) using Mathcad's more versatile Round() function (note the capital R)

I also changed the components to accommodate a second (string) parameter which is appended the number displayed and should be used to display the unit. That way you won't have to edit the script just to change the unit displayed. Its within your responsibility to provide the correct unit. If you use those text boxes you lose Mathcads powerful unit checking ability. The text box will display anything you provide.

Have fun!
 
 http://files.engineering.com/getfile.aspx?folder=7a991119-694f-4d4b-b4c4-22201fecd3de&file=unit_b.xmcdz
Guys how do you know so much? :)
I finished reading my second Mathcad book, but theres nothing on subjects like these :-(
Any "special" book recomendation?
 
If you use the software long enough you'll learn it the hard way :-(
I just know a handful of books about Mathcad and as far as I have seen, most are rather boring, explaining in full length every single menu item, etc. One book stood out of the crowd for me (Pritchard, Mathcad - A Tool for Engineering Problem Solving) as it was clear, with a decent depth and followed a nice hands on approach. It was written when MC14 was the current version and I think the 2nd edition I have is the latest. It included a student license for MC14, too. But its not the "Hidden Tips and Tricks" kind of book you are asking for.

I can only say that I feel that Mathcads help is a great source of information and especially the quicksheets are well worth the time spent with. There used to be a good repository of files at the Mathsoft site, but PTC has ruined it all, pushing only the new and useless Prime version.
If you are searching for a complete(?) reference you'll have to search the net for the user guide of Version 11. This was the last version with a full user guide including the function reference, etc. I have often seen in on the net at universities and other sites offered as pdf for their students.

Also I learned a lot (and still do) by following the main Mathcad forum, now called PTC Community [URL unfurl="true"]http://communities.ptc.com/community/mathcad[/url]. Don't let the many subspaces there confuse you, they seem to be just for decoration only - you can't raslly post at a wrong space. A lot of helpful and knowing people there and even if you don't have a question its a good idea to follow the threads, look at the files and learn.
 
I can only say that I've never read a Mathcad book, nor even delved that much into the manual. But, what I do know is from doing things in Mathcad, and, as rmix22 suggests, from the original Mathsoft Collaboratory, and even the PTC forums.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor