Editing wizard-generated code.

Editing wizard-generated code.

Anonymous
Not applicable
518 Views
5 Replies
Message 1 of 6

Editing wizard-generated code.

Anonymous
Not applicable
I'm working on a project that contains commands which were added with the
ObjectARX wizard, and I need to remove some of these commands and a command
group. However, when I run the "ObjectARX Define Commands" feature, some of
the commands are not listed in the dialog box. Therefore, I need to remove
the required lines manually. However, the lines I need to delete are nested
between wizard-generated comments, indicating that I should not edit the
lines. Something like this:

// NOTE: DO NOT edit the following lines.
//{{AFX_ARX_INIT
.
.
.
//}}AFX_ARX_INIT

Before I render my world forever out-of-sorts with the ObjectARX wizard,
what's the best way to remove the unwanted commands and command groups?

Thanks,
Mike
0 Likes
519 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi,

Well I do not understand why the Wizards do not let you remove them unless
you deleted some Wizard configuration files for your project. Reading your
problem description I understand this is a question on the VC6 Wizards, so
here are the steps:

1. //{{AFX_ARX_INIT
Delete lines for the commands you do not want anymore

2. //{{AFX_ARX_EXIT
Delete lines for groups which do not have commands anymore. Be careful,
if there is still at least one command for that group, you should leave the
line.

3. In StdArx.h
//{{AFX_ARX_FUNC
Delete the function declaration for the command handler you removed

Cheers,
cyrille
0 Likes
Message 3 of 6

Anonymous
Not applicable
Cyrille,

I'm experiencing a problem
that looks like this but in my case commands are perfectly specified between
TAGS and they don't appear of Wizard's CMD dialog box (the command list is
empty).

My code is unchanged:

//
Init this application. Register your
// commands, reactors...
void
InitApplication()
{
 // NOTE: DO NOT edit the following
lines.
 //{{AFX_ARX_INIT
 AddCommand("CDTCMODELADOR", "BARRA",
"BARRA", ACRX_CMD_MODAL | ACRX_CMD_USEPICKSET | ACRX_CMD_NOPERSPECTIVE |
ACRX_CMD_NOPAPERSPACE, CdTcCMDBARRA);
 AddCommand("CDTCMODELADOR",
"TORRE", "TORRE", ACRX_CMD_MODAL | ACRX_CMD_USEPICKSET | ACRX_CMD_NOPERSPECTIVE
| ACRX_CMD_NOPAPERSPACE,
CdTcCMDTORRE);
 //}}AFX_ARX_INIT

 

}

 

// Unload this application. Unregister all
objects
// registered in InitApplication.
void
UnloadApplication()
{
 // NOTE: DO NOT edit the following
lines.
 //{{AFX_ARX_EXIT
 acedRegCmds->removeGroup("CDTCMODELADOR");
 //}}AFX_ARX_EXIT

 

 // TODO:
clean up your application
}

Any tip?

 

Regards,

Fernando.




0 Likes
Message 4 of 6

Anonymous
Not applicable
Hi Fernando,

 

Can you tell me which version of the Wizards
you are using. I'd like to debug this closer.

 

Cheers,

cyrille
0 Likes
Message 5 of 6

Anonymous
Not applicable
Cyrille,

 

Version 1.3.0.5

 

Thanks.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Hi Fernando,

 

Can you tell me which version of the
Wizards you are using. I'd like to debug this closer.

 

Cheers,


size=2>cyrille
0 Likes
Message 6 of 6

Anonymous
Not applicable
Thanks for the help. Another developer added the commands, so I don't know
that the configuration files are correct. That could be the problem.

Mike


"Cyrille Fauvel" wrote in message
news:[email protected]...
> Hi,
>
> Well I do not understand why the Wizards do not let you remove them unless
> you deleted some Wizard configuration files for your project. Reading your
> problem description I understand this is a question on the VC6 Wizards, so
> here are the steps:
>
> 1. //{{AFX_ARX_INIT
> Delete lines for the commands you do not want anymore
>
> 2. //{{AFX_ARX_EXIT
> Delete lines for groups which do not have commands anymore. Be
careful,
> if there is still at least one command for that group, you should leave
the
> line.
>
> 3. In StdArx.h
> //{{AFX_ARX_FUNC
> Delete the function declaration for the command handler you removed
>
> Cheers,
> cyrille
>
>
0 Likes