Anthony,

Check this out:

/////
QUESTION:
When I generate code from my model using the C++ add-in, the code always
seems to get generated into the Rational\Rose\c++\source directory.  I would
like the code to be generated elsewhere.  What can I do to make this happen?

ANSWER:
Select the Tools->Options menu item and look under the C++ tab.  Set the
'Type:' drop down list to read 'Project' and you will find a 'Directory'
property listed.  The Directory property is what determines where the code
gets generated. In all likely hood this property is probably set to
'$ROSECPP_SOURCE'.  The '$ROSECPP_SOURCE' value is a reference to a pathmap
that is set to point to the Rational\Rose\c++\source directory that your
code is getting generated into.  

So, if you wanted to generate your C++ code into a location other than the
default location then you need to set the Directory property to read
something besides $ROSECPP_SOURCE.  The new value for the Directory property
could 
either be a pathmap variable or it could be an absolute path.  Lets say for
instance that you want your C++ code to be generated to the C:\MyCode
directory on your file system.  You have two options:

1.  You could simply replace the '$ROSECPP_SOURCE' value for the Directory
property with 'C:\MyCode'.  This will result in the C++ code for your model
getting generated into the MyCode directory.

2.  Or you could define a pathmap in Rose that points to the C:\MyCode
directory.  To do this you would need to do the following:

i.  Open a brand new model in Rose (you should not define or edit a pathmap
that is being used by a particular model when that model is open).
ii.  Do a File->Edit Path Map...
iii. In the Virtual Path Map dialog box define a pathmap called $MY_CODE and
have it point to the C:\MyCode directory.  
iv.  With the pathmap defined now do a Tools->Options again and set the
Directory property to be $MY_CODE.

Also, you will find that it is not possible to edit the $ROSECPP_SOURCE
pathmap (to have it point someplace other than the Rational\Rose\c++\source
directory) using the Virtual Path Map dialog.  If you attempt this you will
receive an error dialog that states that the pathmap symbol is reserved.
All of the reserved pathmaps are stored in the registry so technically it is
possible to go into the registry and edit the pathmap there.  However, this
is not advisable since it is a reserved pathmap that Rose may be using
elsewhere. Editing the $ROSECPP_SOURCE pathmap in any way might break the
C++ add-in in some other way.  

/////

Please let me know if any of this is unclear.

Regards

Vishu

**********

Annamalai "Vishu" Viswanathan  --  [EMAIL PROTECTED]
Senior Technical Support Engineer

Rational Customer Service - Committed to Service Excellence
SCP Certified:  http://www.rational.com/support/scp.jsp

Rational User Conference 2002.....Freedom to Create!
Call for Papers Now Open at http://www.rational.com/ruc
August 18-22, 2002
Lake Buena Vista, Florida

**********

-----Original Message-----
From: Sumpter, Anthony T (N-Intecon) [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 1:59 PM
To: Rose_Forum (E-mail)
Subject: (ROSE) changing c++ generation location NT


I have tried $data and that doesn't work. I cannot find the project
properties. Please help on changing the location of the generated cpp code.

> A. Todd Sumpter
> Lockheed Martin Management & Data Systems
> * 6304 Spine Rd., Boulder, CO 80301
> * 303/581-4472 (work) / 303/581-4268 (fax)
        * 877/369-9836 (pager)
        * [EMAIL PROTECTED]



************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************

Reply via email to