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:

Active report output a pop up message


Recommended Posts

On 12/7/2019 at 4:31 PM, peter ~ said:

If anyone else could also tell me if this is working properly I would appreciate it so much.

Peter here is what happened when I tried to fire up Mastercam. Might need to check your resource mapping in your .dlls and make sure you not mapping across your local network or some other network with your .dll files. I have seen this problem many years ago and where being able to test on a stand alone system is usually best to debug these types of issues.

 

I did have to trust both the .dll files through Norton since they have to reputation, but that is not related what I am seeing about.

Link to comment
Share on other sites
8 minutes ago, 5th Axis CGI said:

Peter here is what happened when I tried to fire up Mastercam. Might need to check your resource mapping in your .dlls and make sure you not mapping across your local network or some other network with your .dll files. I have seen this problem many years ago and where being able to test on a stand alone system is usually best to debug these types of issues.

image.png.8ea11ce848183e2a5c18a7d507047587.png

I did have to trust both the .dll files through Norton since they have to reputation, but that is not related what I am seeing about.

Thank you, I think I need to link in the 2020 NETHOOK_3.dll

Link to comment
Share on other sites
54 minutes ago, peter ~ said:

The resources should be okay,it loaded fine in 2018

Peter, are you checking this on a stand a lone system not hooked up to your network or other local resources you have on the computer your testing with? Not sure if you have a off network laptop or system that has Mastercam installed but trying running it on that and see if everything works. If it does still doesn't mean you have covered everything still may need to build and test on a 2020 system.

Link to comment
Share on other sites
1 hour ago, 5th Axis CGI said:

Peter, are you checking this on a stand a lone system not hooked up to your network or other local resources you have on the computer your testing with? Not sure if you have a off network laptop or system that has Mastercam installed but trying running it on that and see if everything works. If it does still doesn't mean you have covered everything still may need to build and test on a 2020 system.

If you right click properties -> attributes -> unblock it will work

Link to comment
Share on other sites
8 minutes ago, peter ~ said:

If you right click properties -> attributes -> unblock it will work

Peter that worked to run Mastercam, but I am not sure how or what your work flow intent is for this Chook. I tried it on one of my Mill/Turn projects I am currently programming and it crashed Mastercam. Not sure since everything is define and correct not sure what good my test does, but I got it loaded and on the QAT. Might think about designing a Logo for your .dll so when it is run someone knows what it is verses the Mastercam M that comes in as the default for all no logo Chooks. Maybe Steven can chime back in and see if it s doing everything he needs. Keep plugging away and help solve problems. :thumbsup:

Link to comment
Share on other sites
14 minutes ago, 5th Axis CGI said:

Peter that worked to run Mastercam, but I am not sure how or what your work flow intent is for this Chook. I tried it on one of my Mill/Turn projects I am currently programming and it crashed Mastercam. Not sure since everything is define and correct not sure what good my test does, but I got it loaded and on the QAT. Might think about designing a Logo for your .dll so when it is run someone knows what it is verses the Mastercam M that comes in as the default for all no logo Chooks. Maybe Steven can chime back in and see if it s doing everything he needs. Keep plugging away and help solve problems. :thumbsup:

Yes I will do a logo, and add in 2020 version of nethook_3!! thank you

Link to comment
Share on other sites
On 12/7/2019 at 2:46 PM, peter ~ said:

This  c++ example for mastercam 2018 successfully handles operations with "common parameters" (CONTOUR,DRILLING,2D DYNAMIC MILL,AREA MILL,POCKET) 


#pragma once
//api_tools_exp.h
#include "Header.h"
//functions 1:
  ///mastercam stuff :D
void Get_Tool_From_Op(tp_tool &tl, operation &op)
{
	op_group * machine = OMgetActiveMachineGroup();
	tl_list *nu_t_tlist, *cur_t_tlist;
	DB_LIST_ENT_PTR t_ptr, o_ptr;
	bool t_succf, o_init_ret;
	nu_t_tlist;
	char szLibName[255] = "";
	void * list_ptr = NULL;
	list_manager(TL_ID, szLibName, LSTMGR_GET, &list_ptr);
	nu_t_tlist = (tl_list*)list_ptr;
	if (nu_t_tlist != NULL)
	{
		cur_t_tlist = nu_t_tlist;
		while (cur_t_tlist != NULL)
		{
			if (op.tl.slot == cur_t_tlist->tl.op.slot)
			{
				tl = cur_t_tlist->tl;
				break;
			}
			cur_t_tlist = cur_t_tlist->next_ptr;
		}
		operation_manager(&op, OPMGR_REWRITE, &o_ptr, &o_init_ret);//rewrite operation

	}
}
//class to export:
class ExportFunctions
{
public:
	int LoopThroughOperations(double a, double b, int c, int d)
	{
		op_group * machine = OMgetActiveMachineGroup();
		op_list *nu_o_oplist, *cur_o_oplist;
		DB_LIST_ENT_PTR t_ptr, o_ptr;
		bool t_succf = true, o_init_ret;
		char szLibName[255] = "";
		void * list_ptr = NULL;
		list_manager(OP_ID, szLibName, LSTMGR_GET, &list_ptr);
		nu_o_oplist = (op_list*)list_ptr;
		if (nu_o_oplist != NULL)
		{
			cur_o_oplist = nu_o_oplist;
			while (cur_o_oplist != NULL)
			{
				tp_tool tl;
				DB_LIST_ENT_PTR* tlptr;
				Get_Tool_From_Op(tl, cur_o_oplist->op);
				char message[2000];

				sprintf_s(message, " # : %lf : %lf", cur_o_oplist->op.cmn.depth, tl.oa_length);

				MessageBox(NULL, t_succf ? message : "Operation Failed", "SharkBait", MB_OK);
				if (cur_o_oplist->op.cmn.depth < 0.0 - tl.oa_length) {MessageBox(0, "Error Z-Depth Is Greater Than Overall Tool Length", "ERROR",MB_OK); }
				if (tl.oa_length + cur_o_oplist->op.cmn.depth > .5) { MessageBox(0, "Error Overall Tool Length Is Greater Than 0.5", "ERROR", MB_OK); }
			if (cur_o_oplist->op.db.select_flag == FALSE)

			{

				bool succf = FALSE;

				DB_LIST_ENT_PTR eptr;



				cur_o_oplist->op.db.select_flag = TRUE;

				operation_manager(&cur_o_oplist->op, OPMGR_REWRITE, &eptr, &succf);

			}



			/* next operation */

			cur_o_oplist = cur_o_oplist->next_ptr;
		}
	}
		return 1;
	}
};

 

Hello Peter,
   Are these codes can be added to my current Active Report file?

 

Thank you for your time,
   S.Luong

Link to comment
Share on other sites
13 minutes ago, PcRobotic said:

Hello Peter,
   Are these codes can be added to my current Active Report file?

 

Thank you for your time,
   S.Luong

No, for active reports the code is always written in the vb.net editor.

Link to comment
Share on other sites
On 12/7/2019 at 2:46 PM, peter ~ said:

This  c++ example for mastercam 2018 successfully handles operations with "common parameters" (CONTOUR,DRILLING,2D DYNAMIC MILL,AREA MILL,POCKET) 


#pragma once
//api_tools_exp.h
#include "Header.h"
//functions 1:
  ///mastercam stuff :D
void Get_Tool_From_Op(tp_tool &tl, operation &op)
{
	op_group * machine = OMgetActiveMachineGroup();
	tl_list *nu_t_tlist, *cur_t_tlist;
	DB_LIST_ENT_PTR t_ptr, o_ptr;
	bool t_succf, o_init_ret;
	nu_t_tlist;
	char szLibName[255] = "";
	void * list_ptr = NULL;
	list_manager(TL_ID, szLibName, LSTMGR_GET, &list_ptr);
	nu_t_tlist = (tl_list*)list_ptr;
	if (nu_t_tlist != NULL)
	{
		cur_t_tlist = nu_t_tlist;
		while (cur_t_tlist != NULL)
		{
			if (op.tl.slot == cur_t_tlist->tl.op.slot)
			{
				tl = cur_t_tlist->tl;
				break;
			}
			cur_t_tlist = cur_t_tlist->next_ptr;
		}
		operation_manager(&op, OPMGR_REWRITE, &o_ptr, &o_init_ret);//rewrite operation

	}
}
//class to export:
class ExportFunctions
{
public:
	int LoopThroughOperations(double a, double b, int c, int d)
	{
		op_group * machine = OMgetActiveMachineGroup();
		op_list *nu_o_oplist, *cur_o_oplist;
		DB_LIST_ENT_PTR t_ptr, o_ptr;
		bool t_succf = true, o_init_ret;
		char szLibName[255] = "";
		void * list_ptr = NULL;
		list_manager(OP_ID, szLibName, LSTMGR_GET, &list_ptr);
		nu_o_oplist = (op_list*)list_ptr;
		if (nu_o_oplist != NULL)
		{
			cur_o_oplist = nu_o_oplist;
			while (cur_o_oplist != NULL)
			{
				tp_tool tl;
				DB_LIST_ENT_PTR* tlptr;
				Get_Tool_From_Op(tl, cur_o_oplist->op);
				char message[2000];

				sprintf_s(message, " # : %lf : %lf", cur_o_oplist->op.cmn.depth, tl.oa_length);

				MessageBox(NULL, t_succf ? message : "Operation Failed", "SharkBait", MB_OK);
				if (cur_o_oplist->op.cmn.depth < 0.0 - tl.oa_length) {MessageBox(0, "Error Z-Depth Is Greater Than Overall Tool Length", "ERROR",MB_OK); }
				if (tl.oa_length + cur_o_oplist->op.cmn.depth > .5) { MessageBox(0, "Error Overall Tool Length Is Greater Than 0.5", "ERROR", MB_OK); }
			if (cur_o_oplist->op.db.select_flag == FALSE)

			{

				bool succf = FALSE;

				DB_LIST_ENT_PTR eptr;



				cur_o_oplist->op.db.select_flag = TRUE;

				operation_manager(&cur_o_oplist->op, OPMGR_REWRITE, &eptr, &succf);

			}



			/* next operation */

			cur_o_oplist = cur_o_oplist->next_ptr;
		}
	}
		return 1;
	}
};

 

Good morning Peter,
    Thank you for your valuable time and great amount of hard coding.  My question is, are these hard codes are for active report for C-Hook?  If Active Report, how can I embed it into my current Active Report when I already used VIRTUAL BASIC language.

 

Once again, thank you for your time.

Link to comment
Share on other sites
8 minutes ago, PcRobotic said:

Good morning Peter,
    Thank you for your valuable time and great amount of hard coding.  My question is, are these hard codes are for active report for C-Hook?  If Active Report, how can I embed it into my current Active Report when I already used VIRTUAL BASIC language.

 

Once again, thank you for your time.

They are for CHOOK

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