![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Environment Variables in #include statement??? Topic Summary: Created On: 16-Aug-2007 18:10 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Scott, If you can move the file to a folder under the lib\dxl folder of the $DOORSHOMEPerforming a relative include from \Program Files\Telelogic\DOORS_8.1\lib\dxl | |
![]() |
|
Just curious is there a way to use $DOORSHOME in a #include statement. I need to include a file installed in the DOORS home directory, but in some cases the IT in their infinite wisdom decided to install the DOORS client on the C: drive while in others they installed on the D: drive. Because the include statements are preprocessed an if statement doesn't seem to work. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Scott, If you can move the file to a folder under the lib\dxl folder of the $DOORSHOMEPerforming a relative include from \Program Files\Telelogic\DOORS_8.1\lib\dxl Edited: 16-Aug-2007 at 19:37 by Douglas Zawacki |
|
![]() |
|
![]() |
|
duh!!!! I was putting a back slash in front of mydxl.....
#include <\mydxl\myfile.dxl> No wonder it didn't work for me..... Thanks ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
There are a few other posts about this same topic....short answer is, "No." Like you say, #includes are preprocessed so you can't conditionalize them (there's unfortunately no #ifdef or anything).
But, the long answer is, "Maybe." One thing you might be able to do is to just make an if/else with two different includes. The code ends up all being there from both includes, but only one ever gets executed. Kind of messy though. Chris Edit: Oops, too slow. Didn't quite read your initial post that closely either I see... Edited: 16-Aug-2007 at 19:39 by Chris Jones |
|
![]() |
|
![]() |
|
quote: Tried that but it didn't work. Reason is because for one of the includes the file doesn't exist..... I tried this, but it still tries to include both files: ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
The problem was this. We had existing modules created by the Artisan DOORS synchroniser (ADS), but we did not necessarily have ADS installed on the clients. This caused run time errors whenever the modules were opened.
The solution was to create stub functions and install these, but if ADS was installed then we wanted to use the actual code. So, we check for the existance of a file and then #include it via an evalTop_ call. Note that this only works in the top context, i.e. the included file is globally available. The following is some code from out startup.dxl. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.