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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

what this error in program

kguru
1-Newbie

what this error in program

#include "ProToolkit.h"
#include "user_tk_error.h"

#include "ProMdl.h"
#include "ProMenu.h"
#include "ProMessage.h"
#include "ProNotify.h"
#include "ProObjects.h"
#include "ProUtil.h"
#include "ProTKRunTime.h"


static wchar_t msgfil[30];

//ProName msgfil;
//wchar_t msgfil[]=L"usermsg.txt";
//wchar_t *msgfil=new wchar_t;
//static ProFileName msgfil;
//static wchar_t msgfil[]={'u','s','e','r','m','s','g','.','t','x','t','\0'};

int UserPartStatus()
{
    ProMdl       p_part;
    ProMdldata   info;
    ProBoolean   is_modified;
    ProError     err;

    err=ProMdlCurrentGet(&p_part);
    ERROR_CHECK("UserPartStatus","ProMdlCurrentGet",err);
    err=ProMdlDataGet(p_part,&info);
    ERROR_CHECK("UserPartStatus","ProMdlDataGet",err);
    ProMdlModificationVerify(p_part,&is_modified);
    ERROR_CHECK("UserPartStatus","ProMdlModificationVerify",err);
    if (is_modified==PRO_B_TRUE)
  ProMessageDisplay(msgfil,"USER Current object: %0w.%1w (MODIFIED)",info.name,info.type);
else
  ProMessageDisplay(msgfil,"USER Current object: %0w.%1w",info.name,info.type);
return 0;
}

ProError UserCheckPart()
{

    return(PRO_TK_NO_ERROR);
}

extern "C" int user_initialize()
{
    int menu_id;
ProStringToWstring(msgfil,"usermsg.txt");
    ProMenuFileRegister("part","part.mnu",&menu_id);
    ProMenuAuxfileRegister("part","part.aux",&menu_id);
    ProMenubuttonActionSet("part","Status",(ProMenubuttonAction)UserPartStatus,NULL,0);
    ProNotificationSet(PRO_MDL_SAVE_PRE,UserCheckPart);
    return (0);
}

extern "C" void user_terminate()
{
    ProTKPrintf ("Pro/TOOLKIT application terminated successfully\n");
}

dll  file was created.

Warning 1 warning MSB8005: The property 'NMakeCleanCommandLine' doesn't exist.  Skipping... C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets 32 6 testing

2 IntelliSense: too many arguments in function call d:\toolkit\testing\testing\testing.cpp 35 21 testing

3 IntelliSense: too many arguments in function call d:\toolkit\testing\testing\testing.cpp 37 21 testing

3 REPLIES 3
sully7
13-Aquamarine
(To:kguru)

Hi Keerthana,

Please add "#define PRO_USE_VAR_ARGS" to your code (I personally typically place it in a header file).

That should fix your problem.

Thanks,

James Sullivan

CadActive Technologies

President & Founder
CadActive Technologies - www.cadactive.com
kguru
1-Newbie
(To:sully7)

sorry.

I can't understand

sully7
13-Aquamarine
(To:kguru)

Change your code to this:

#define PRO_USE_VAR_ARGS // <------- ADD THIS TO ENABLE ARGUMENTS FOR ProMessageDisplay

#include "ProToolkit.h"
#include "user_tk_error.h"

#include "ProMdl.h"
#include "ProMenu.h"
#include "ProMessage.h"
#include "ProNotify.h"
#include "ProObjects.h"
#include "ProUtil.h"
#include "ProTKRunTime.h"


static wchar_t msgfil[30];

//ProName msgfil;
//wchar_t msgfil[]=L"usermsg.txt";
//wchar_t *msgfil=new wchar_t;
//static ProFileName msgfil;
//static wchar_t msgfil[]={'u','s','e','r','m','s','g','.','t','x','t','\0'};

int UserPartStatus()
{
    ProMdl       p_part;
    ProMdldata   info;
    ProBoolean   is_modified;
    ProError     err;

    err=ProMdlCurrentGet(&p_part);
    ERROR_CHECK("UserPartStatus","ProMdlCurrentGet",err);
    err=ProMdlDataGet(p_part,&info);
    ERROR_CHECK("UserPartStatus","ProMdlDataGet",err);
    ProMdlModificationVerify(p_part,&is_modified);
    ERROR_CHECK("UserPartStatus","ProMdlModificationVerify",err);
    if (is_modified==PRO_B_TRUE)
  ProMessageDisplay(msgfil,"USER Current object: %0w.%1w (MODIFIED)",info.name,info.type);
else
  ProMessageDisplay(msgfil,"USER Current object: %0w.%1w",info.name,info.type);
return 0;
}

ProError UserCheckPart()
{

    return(PRO_TK_NO_ERROR);
}

extern "C" int user_initialize()
{
    int menu_id;
ProStringToWstring(msgfil,"usermsg.txt");
    ProMenuFileRegister("part","part.mnu",&menu_id);
    ProMenuAuxfileRegister("part","part.aux",&menu_id);
    ProMenubuttonActionSet("part","Status",(ProMenubuttonAction)UserPartStatus,NULL,0);
    ProNotificationSet(PRO_MDL_SAVE_PRE,UserCheckPart);
    return (0);
}

extern "C" void user_terminate()
{
    ProTKPrintf ("Pro/TOOLKIT application terminated successfully\n");
}

President & Founder
CadActive Technologies - www.cadactive.com
Announcements


Top Tags