Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Analyse


mmetzinger
 Share

Recommended Posts

Here is my example. I analyse the end point of a line and what I want to do is get the Z value of this end point. I want to use this value in some calculations. The resulting number I get is not some nice round number, but a number that goes out many places (i.e. .9782657312). To use it, I have to write it down and type this value in. This can cause errors if I get it wrong. I would like to be able to use a mouse click to copy this value and then paste it where I need it. Is there a way to do this, and if not, would anyone want to tackle a C-hook to be able to do this? I am not up to 9.1 yet and don't know when we will go there, so I can't get to the VB script. Also, I am not proficient in VB or C++. This would be a very helpful thing. Thanks

Link to comment
Share on other sites

Analyze blows chunk. mad.gif

 

Solution

1) What Rekd said.

 

2) The prompt area in MC isn't realy text it's just a bitmap with text written on it. Sorta like if you enter text into microsoft paint. It's there but it itsn't. I really wish mastercam would redesign the prompt area so you can copy the text out of it. This is usually one of the first complaints I here from our desingers when they first start using MC. Especialy if they come from a system that has a history function. I believe I sent copyable text as a feature request waaaaay.. back when 8.0 was in beta. No luck so far.

 

If you realy need to copy the prompt area look for a program called Kleptomania or other programs that are similiar. What they do is take a screen cap of your screen (or highlighted area) then run it through an OCR routine. The resulting text is stuck into the clipboard for pasting.

 

The downside is these programs are quite expensive. frown.gif

 

Bryan smile.gif

Link to comment
Share on other sites

quote:

it's just a bitmap with text written on it

Actually, it's likely either a lable or a text box that's been disabled. (Display only) There are simple triggers that you can use in C++ to enable data to be taken from them, it's just a matter of getting the fine folks at CNC to realize the need for it.

 

'Rekd teh "Stay tuned, I could say something really brilliant any time..."

Link to comment
Share on other sites

If you really need to place a value of an entity into another field within MC, use the right mouse button, drop down menu appears, x coordinate of a point, y,z ,dia of arc, many many more. When you are in the feild that you need to fill, right click, pick on entity and there you go.

 

HTH

Jeremiah

 

[ 04-09-2003, 01:06 PM: Message edited by: Jeremiah ]

Link to comment
Share on other sites

I'll wager a guess and say that it's not an MFC text box, but rather a home-grown one. Perhaps, it's not a text box, per se, at all [queue Twilight Zone theme] eek.gif

 

To answer mmetzinger's questions...yes, a C-Hook could be written that allows you to select a point and then copy the x, y or z value to the clipboard for you to use somewhere else.

Link to comment
Share on other sites

Rekd,

 

I wish the prompt area was a label or text box then you could use the MFC GetWindowText Function or something similar to read the text from the control. It then wouldn't matter if it were disabled or whatnot. Unfortunately its a Static Class or Static Control. Which doesn't allow reading the displayed text since it's basically a bitmap.

 

I looked into this a few months ago with hope to use some OCR code to get around this problem. I had hoped to use a chook that would grab the statisbar bitmap run it through the OCR and then play with the resulting text. Unfortunately it just ended in frustration for me. frown.gif

 

I ran up against my own limits, I just wasn't smart enough or a good enough programmer to figure it out. frown.gif The limit of MC using a static control that I’m sure makes a lot of backend code simpler for them. Finding usable OCR code isn't fun either. The consumer packages cost money (lots) and aren't small downloads. I wanted to keep the chook small and free. And most of the free stuff is just college kids messing around with AI software. Not really practical. Or the code is oriented to mass scanning of documents for archival reasons. I don't have the time or energy to hack through a large project to whittle it down to practical size for me.

 

A coworker (hi Kevin) came up with the idea that I should just write my own simplified version of analyze. Then you would be able to pick and choose what text to stick in the clipboard or mess around with.

 

Eventually, I just decided the effort far outweighed the benefits. I had/have a dozen other projects that my time is better put towards.

 

Oh well. On to bigger and better things.

 

Bryan smile.gif

Link to comment
Share on other sites

Unless I am missing something, the answer is very simple. Rather than use analize and retyping a value, try this

Create, arc, point/dia. When MC prompts for a value, enter an X, Y, Z, A (angle), R (radius), D.... and hit enter. MC allows you to pick an entity to get that value from. That value apears in a text box and can be cut and pasted into anything you wish.

Link to comment
Share on other sites

Oh creating an analyze chook I have no problem with. I'm pretty comfortable with the clipboard. I feel I have a good grasp on the basic entities in mastercam. The sdk itself provides much of the information I would need, like 2d and 3d distance. The entities themselves would provide the rest. Like radius, color, level, etc for an arc. Then like you said it would be a matter of offering up the apporiate values to choose from to stick in the clipboard. Like an arc would be weighted towards x, y, z, radius, and then maybe color and level.

 

I just realized I only need to copy things like the z level and such rarely. Most of the time doing like Rekd suggested, editing the entity, works fine. I always have a notepad next to my keyboard and that takes care of the rest.

 

I felt the Bang for the Buck factor wasn't there. I could spend and hour, day or whatever on the chook and probably only save 20 or 30 minutes in next year. Fortunetly I have other ideas/projects with more time and costs savings I could better put my time and effort towards.

 

Bryan smile.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...