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:

arenner

Verified Members
  • Posts

    216
  • Joined

  • Last visited

Everything posted by arenner

  1. I'm opening up an IGES model, with Mastercam X2. I rotate my model 90 degrees so that it is oriented lengthwise along the z-axis. Then I translate it into the positive z-space. Then I save it in ASCII format as an STL file. When I open up the STL again, the model is oriented lengthwise along the y axis. It looks like the y and z coordinates were swapped during the save/conversion to an STL. What the heck
  2. While starting to set up a function to extrude circles I ran into a general question with the SDK and the Mastercam Help file. I often will go to the help and copy the function structure that I need from the example code. Of course, there are comments, and I can get a general idea of what the parameter controls. But if I am not aware of the parameter definition, and my search through the forum does not result anything, I'm usually at a loss on what value to specify. For example, in the _CHAIN_ENT structure, there is a parameter called density. After reading the comment and searching the forum I got some more information. But even with this I will need to specify a double variable in my code. What I really want to input is the Mastercam Default. This way, when I compile I have a "safe" value in place. This is where my question really begins. Is there a location for each parameter where I can find what the "Mastercam Default" is. Can I locate those defaults to ease the process of specifying parameters when I am not aware of their full meaning? This is mainly the case when I have a double value, but in some cases also with integer values. Thanks in advance.
  3. Hey cool Thad. I might just do that. I haven't created any bmps for it. So if I get those I'd take you up on that. Thanks a bunch.
  4. Hey Roger. I don't know what myRes.resources is. I copied one that I found in: C:Program Filesmcamxcommontemp Then I copied it to C:mcamxcommontemp which is the directory that the error message said it was reading from. But again, I don't even know if that is being read or output to. As for the path, no it is not changing. It keeps saying that it can't read from C:mcamxcommontemp no matter what I change the "Files" setting to (yes I changed the "Files -> Temp" option). But I recheck that to see if it kept the directory change in the configuration gui, and it did. But for instance, when I change it to something like C:temp, the error message doesn't change. Thad: I never was successful at getting it to run. It is not just showing up recently.
  5. Well, it should be able to connect to the folder I setup. I even copied the myRes.resources file to the temp directory I specified in the X configuration settings.
  6. No, it didn't work. I tried changing the files to two location, one to c:temp, and also to c:mcamxcommontemp thinking that the program was using the default path. Any other ideas?
  7. I looked around more and do have 1.1 for sure, but do not have 2.0. I'll be setting setting the temp file on monday. I'm surprised the detailed error message wasn't able to help diagnose my problem any better. But I guess since it can't find "myRes.resources" it must be simply not finding the directory.
  8. 1) No, I don't know if I'm running .NET 2.0. I am running Visual Studio 2003 .NET, but am not experienced enough to know the difference. I do have the ".NET framework SDK 1.1" listed. 2) Yes, this one does: C:Program Filesmcamxcommontemp Could I create mcamxcommontemp and see if it uses it? There aren't any files in the directory listed in 2). So it seems to be an output directory.
  9. I had a very late version, I had just pulled it off. But I went ahead and downloaded it another time. I should have the latest version now, and I still get the same error.
  10. I saw that Roger specifies a level in his example, thank you. I was understanding that that was only in the database, but not in the graphics window? I need my users to see the circles in the window as well as select them from the database. If they are one in the same, I apologize, I'm very new at this.
  11. When I run Script Linker I get this "Fatal Error!": ---- Compiling file: "C:...~RunWrapper.cs" Source file 'FilesmcamxcommontempmyRes.resources' could not be found at line 0 column 0 Error reading resource file 'c:Program' -- 'The system cannot find the file specified. 'at line 0 column 0. ---- I read the Script Linker word document, and am calling the VBS from the mcamxvb directory. Any thoughts?
  12. Thanks for the example code Roger. There are many things in your code that will help me. I hate to keep asking for more, but that's what you guys get for being so darn helpful What's the easiest way to draw an arc in the graphics window on a specified level? Thanks again.
  13. First, let me say thanks for the advice, but I'm still not getting very far here. As Roger said arc is being sent, not input. So I am reading Jon's comments with that in mind. Now it makes a lot more sense. I was declaring and defining the a_2d structure called arc in my code. I'm guessing that I don't even have to do that. It will simply output an a_2d structure. Reading the help didn't make that very clear. Why does the help say reconstruct? I'm reading Jon's comments, and yes, I did change the '.' to a '->'. But again, there's no need for that if arc is not an input. I don't need to define each element of the arc structure. Also, I'm reading min_radius as the radius of the arc, so I thought end_pt was redundant. But then seeing Roger's line 'min_radius = nc_tol;' made me think otherwise. It looks like you set min_radius to the smallest nc tolerance setting. Is min_radius or end_pt defining my circle's radius. To Roger's comment that it isn't constructed on the graphics screen, or in the database, makes this function seem useless. What is this function used for/where's the circle? I am drawing these circles so that I can later extrude them into cylinders. I'll need them to at least be in a database so that I can refer to them. Is there a different way to draw circles?
  14. Actually I did cut and paste my code from visual studio. If you mean the error, I also copy and pasted that. I did this because I had the same disbelief that you must be having when I saw the error! I also thought the error code C2664 might be helpful. Thanks for the suggestion on using a reference operator, but I had tried that too. With that attempt I get this error (notice again the error code C2664): error C2664: 'constr_circle' : cannot convert parameter 5 from 'a_2d *__w64 ' to 'a_2d *' Any thoughts on that?
  15. Hello All. I'm using the help file on "constr_circle". It says that it is reconstructing it. I'd simply like to construct a circle. Is there a way to do that given a_2d parameters. I can't get constr_circle to work. I defined my a_2d structure, but inside the constr_circle function call I'm not sure how to pass in the "arc" structure. I define my a_2d structure as: a_2d *arc; Then I can refer to members of *arc with: (*arc).r = 0.5; But when I call constr_circle I use this: constr_circle(end_pt, c, cw, min_radius, arc, succf); And an error: C2664: 'constr_circle' : cannot convert parameter 5 from 'a_2d *' to 'a_2d *' Any help for a newbie with calling a structure would be appreciated.
  16. Thanks guys. I dropped in Mastershake's snippet and she rotated on the axis like it should. Preciate it.
  17. arenner

    C-HOOK

    Got it, and replied
  18. Thanks Mastershake. I was thinking constr_view was a variable when my search for constr_view didn't return a function in the help file. I found the information in the "Math Variables" documentation. Yeah, I'll set the view to 5, then switch it back to top (1) when I'm done. Thanks to you both
  19. Thanks for the info Pete. I'm afraid I'm sorta new to this programming stuff. I'm not sure you mean by "setting 'constr_view' to 5 before calling rotate_silent()." Is 'constr_view' just your variable name? When you say "set constr_view BACK to whatever it was immediately afterwards." why is that important? I guess I could return it to the top view after calling rotate silent. Excuse the newbieness. Thanks.
  20. arenner

    C-HOOK

    Thad, I sent you an email from [email protected] Thanks for the help, Alex
  21. All, I'm using the function: rotate_silent. In the help file, it says that the sixth argument should be a short variable type to represent the view to rotate the model in. From some vbs experience, 5 seems to be a side view. I need to rotate my part about the x-axis. So I chose the side view as my rotate_silent function argument. The problem is, it doesn't rotate in that view. It only rotates in the top view, no matter what value I put for the argument. Am I misunderstanding the argument, or am I going to have to set my construction plane to "side" before using this function?
  22. arenner

    C-HOOK

    Hey Thad, thanks for the reply. When I opened MC_chooks.ft I thought, boy, I could have even figured that out without Allan's code I just needed that direction to the right file. It made very quick work of adding an icon. It is a bummer I don't have any way to decipher which icon goes with which dll. Is there any way that one of those options in the ft is the tooltip popup? That'd be nice. Otherwise I'll just create a vbs to run the chook, and use Script Linker to create some snazzy icons, well, as artistic as an engineer can be Thanks for the info!
  23. arenner

    C-HOOK

    Hello. I found this thread after looking for a way to add Chook icons to a toolbar. I follow most of it, and have already added a toolbar that I called Chooks. But under Category in the Customize window, I only see about a dozen or so icons. I have a lot more Chook in my directory. For some reason it only has icons for a few of them. Also, all of my Chook icons look exactly the same. Is that right? I'm not following the part above: --- There is a purple ball that is the all-result chook and another icon with a couple of circles that is the arc-chook. --- I don't see that, but may be looking in the wrong place. Basically what I'd like to do is link a button to a chook that I created and dropped in the chook folder. I also saw the Script Linker tool for linking to VBS files. I could do that, then call my chook from my VBS script, but would rather link to the chook directly.
  24. Everything was inititalized properly, including setting the FILE * pointer = NULL. If anyone would like to see my code, I could be missing something. Thanks.

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...