AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WD.ENV file - env codes vs. globals

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
Anonymous
2943 Views, 13 Replies

WD.ENV file - env codes vs. globals

Is there any difference (in end effect) between these two lines that I might add to the WD.ENV file:

My goal is to make it so that everyone in our company is using

 

1.)  SETQ : GBL_DOCSETWDBASE, Q:\ACADE 2011\AEDATA\

 

2.) WD_DIR, Q:\ACADE 2011\AEDATA\

 

My goal is to make it so that my machine looks for ACADE info from our company server (Q drive) rather than my local machine.

 

 

On a side note, I found this entry in the default wd.env file quite confusing:

 

*WD_DIR% = base folder where "wd.env" is located

                    (exaple: "C:\My Documents\AcadeE 2010\AeData\")

                    (corresponds with global GBL_WD_DOCSETBASE)

 

How exactly does it make any sense to define where a file is located - inside that file itself.

We're telling ACAD how to *find* wd.env....inside fo the wd.env file?

 

Am I crazy that this makes no sense to me?

 

Here' an analogy:

Suppose you wanted to get to new york city and needed the directions to get there.

But the only place you find such directions was inside of new york city itself.

How would anyone ever get there?

 

I'm having the same confusing issue about wd.env file.

 

 

13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

There are different ways to achive networking in ACADE. Try looking at this very helpful site under Sharing AutoCAD® Electrical across a network

Message 3 of 14
Anonymous
in reply to: Anonymous

Thanks for pointing that out Evan, but I have already read that, as well as what's on the autodesk wiki.

I'd like to focus my question on this wd.env file issue.

 

How is it that there's a line inside of the wd.env file that defines where that very same wd.env file is to be located?

 

Does anyone else see the fundamental problem there?

Defining a file's path location - - inside fo the file itself?

 

When ACAD first launches, I assume it uses the settings inside of the wd.env file to setup the environment.

So it must know where wd.env is, right?

How does it know?

So it has to already, somehow implicitly know, where the wd.env file is located.

Yet, at the same time, the path location of the wd.env file is defined in one of the lines inside the wd.env file???

 

It seems convoluted and impossible.

Yet it works.

So I know I'm misunderstanding something.

I'm just not sure what exactly. 😕

 

 

 

 

Message 4 of 14
sonny3g
in reply to: Anonymous

It is possible to have multiple .env files that are project specific.  Inside these files you may need to point to the default wd.env file.  Just a thought.

 

Scott

Scott G. Sawdy
scott.sawdy@bluecoyotecad.com
Message 5 of 14
Anonymous
in reply to: sonny3g

I've heard of that Scott, thanks.

I suppose if you wanted to get really, really efficient with ACADE you could use project specific env files.

 

But getting back to my question.

 

How does ACAD, at first launch, decide what path to search through to get to the WD.env file?

 

My problem right now is that I have a "wd.env" file both on my local machine and on my server's networked drive:

 

C:\Documents and Settings\My Documents\Acade 2011\AeData\wd.env

 

AND

 

Q:\Acade 2011\AeData\wd.env

 

and I never know which one it's using.

I'll try putting different settings in each (such as changing them so that the insert schematic symbol browse menu goes to a networked location instead of local machine) to give me a clue of which one is "active".

 

But then it seems as though it's pulling some settings from each file.  It seems it's not a "one or the other" situation, but a "use a little bit of both" situation.

Message 6 of 14
randybrunette
in reply to: Anonymous

Take a look at the attached document. It trys to explain the relationship of wd.env file, and the wd_load.lsp file.

 

As for the reference you found in the wd.env file to the %WD_DIR%, the meaning to this is that when you want to specify the path to the wd.env file, instead of typing in an explicit path that may change, you can enter the variable %WD_DIR%.

 

That way if the explicit path changes, your entry will still find the correct location.

 

Let us know if this helps.

Randy Brunette
Brunette Technologies, LLC
randy.brunette@brutec.us
www.brutec.us
Message 7 of 14
Anonymous
in reply to: randybrunette

Here's what doesn't make sense to me.

The lisp file defines the variable GBL_WD_DocSetWDBase.

This variable defines where WD.ENV file is.

 

But within the contents of WD.ENV is a line where you can set the variable GBL_WD_DocSetWD to whatever you want.

 

This is a circular reference.

GBL_WD_DocSetWD defines where WD.ENV is.

But WD.ENV defines GBL_WD_DocSetWD (or at least is capable of doing so.

 

How can this be?

Which one's settings are ultimately used?

 

Does my question make sense?

 

By the way, I tried adding this line to WD.ENV but it doesn't produce any effect:

SEQ:GBL_WD_DocSetWD, "\\ptssbs2008\autocadedatabse\installation deployment\AeData\", redirect

 

Where the "installation deployment" directory is a network deployment style installation that I created from within the autocad installer.  One of the settings in this deployment is to put the Symbol Library and the Databases on our server so that everyone is using the same thing.

 

This would require, however, that everyone reinstall ACADE.

I'd rather figure out how to just change WD.ENV to make plc database and catalog lookups pull from the databases on the server rather than their local machine.  This would achieve the synchornization we're looking for without requiring everyone do a fresh install from the network deployment.

Message 8 of 14
randy.brunette
in reply to: Anonymous

I think you are interpreting this comment incorrectly, as more than a comment.

 

*WD_DIR% = base folder where "WD.ENV" is located

                    (example: "C:\My Documents\AcadeE 2010\AeData\")

                    (corresponds with global GBL_WD_DOCSETBASE)

 

This is just a comment in the WD.ENV file telling you that you can use the variable %WD_DIR% to represent the path to the ENV folder. You can use this variable anywhere in the WD.ENV file without have to type in the explicit address to the file. This is not meant to imply that you can set the path in the ENV file.

 

For example, by default ENV files are stored in the C:\Users\{username}\Documents\Acade 2013\AeData folder. In the WD.ENV file this path can be represented by %WD_DIR%. By default the catalog files are stored as a sub-folder in the AEData folder, so the line in the WD.ENV file for the catalog path can be either:

 

WD_CAT,%WD_DIR%/catalogs/

(this is the default)

 

or

 

WD_CAT,C:\Users\{username}\Documents\Acade 2013\AeData/catalogs/

(using the explicit path)

 

In a default installation, these two lines would produce the same results. However, if not a default installation, for example two users on the same computer, the explicit path (2nd line) would change possibly producing pathing errors. The first line using the variable would adjust automatically to the correct path.

 

You cannot change the search path to the ENV file in the WD.ENV file, it can only be changed in the WD_LOAD.LSP file. This LISP file is loaded automatically when ACE starts, and points ACE to the folder where the ENV files are stored. As mentioned in a different post, you can have a different ENV file for different projects, but all ENV files must be located in the same folder as specified in the WD_LOAD.LSP file.

 

There is another way to establish a consistent environment for your users is in this post:

 

http://forums.autodesk.com/t5/AutoCAD-Electrical/wd-env-file-location/m-p/2963360/highlight/true#M22...

 

The key to using this method is to rename the AEData folder on the local drive so that ACE is forced to the search path to find the relocated AEData folder.

 

Let me know if this helps.

 

 

thanx
randy

randy.brunette@autodesk.com
Message 9 of 14
Anonymous
in reply to: randy.brunette

Randy,

 

Thank you for the detailed reply.  It appears I can achieve the synchronization I'm looking for my using the deployment installation I have created.  I used a test machine at work, installed ACADE from the deployment, and now when the test machine adds something to the catalog or the plc database, I see those additions immediately on my machine as well. 🙂

 

This is excellent except for one thing: it requires everyone reinstall ACADE in my department.

 

I'd rather just add a few lines to their WD.ENV files to achieve this.

 

I tried adding the line:

WD_CAT,Q:\INSTALLATION DEPLOYMENT\AEDATA\CATALOGS\

to the WD.ENV file.

 

This works fine on the 64-bit deployment, but doesn't work on another machine that is running a 32-bit deployment I created.  That machine gives me the message:

(no catalog lookup file found)

at the command prompt when I do a catalog lookup.

 

Upon creation, both deployments (64-bit and 32-bit) were made to point at the same place on the server for the Symbol Library and Catalog info.  I don't know why it works for the 64 but not the 32.  I shouldn't even need the WD_CAT statement in the WD.ENV file at all should I?

 

Both deployments use the same WD.ENV file.  I'm certain of this because other entries I've made in the WD.ENV file *do* work, such as changing the default path of the "browse" button on the Insert Schematic Component menu.

 

I'm very, very close to achieving my end goal here.  Unfortunately we do have 32-bit machines yet in use here.  I have to figure out a way to make it work for them too.

 

TIA

 

Message 10 of 14
amigaman68
in reply to: randy.brunette

Randy,

 

     We would like to have a different location for the enviroment file. I figured hou how to change the wd_load.lsp file line 140 to the desired directory, but this really breaks autocad. 

 

; ** 04-Jan-07 NEHolt - 879631
;(setq GBL_wd_DocSetWDBase (strcat (wd_4_all_slashes_forward (getvar "MYDOCUMENTSPREFIX"))
;"/AcadE " version_number "/AeData/"))
(setq GBL_wd_DocSetWDBase "C:/ACADE Shared Directories/ACADE/")

 

when we do its it load the correct wd.env file in our desired location but causes acad electrical to

 

    1. clears projects in project list

    2. the local project database goes to temp instead of the use project and uses a temp name instead of the project name

 

Not sure why.

Message 11 of 14
randy.brunette
in reply to: amigaman68

It will be a little hard to determine without actually seeing your path structure and ENV file.

 

It seems that you have inadvertently also changed some of the other paths in the ENV file such as the User folder which contains the LastProj.fil file that contains the project list. The User folder must remain unique for each user.

 

By default this path is set to WD_USER,%DS_DIR%/user/ in the standard WD.ENV file. The global variable is GBL_WD_DOCSETBASE. Notice that this is VERY similar to the ENV global varialbe.

 

I need more clarification on the database challenge. Are you referring to the project scratch database? Those are also located in the User folder.

 

Message 12 of 14
amigaman68
in reply to: randy.brunette

yes i was referring to the scratch database

Below is my wd.env file

* AutoCAD Electrical - project environment settings.
* Format is: env code,setting,description (separated by commas)
* The setting value, if a path, can be fully hard-coded or can include one
* of the following aliases:
*
* %PF_DIR% = base executable install folder
* (example: "C:\Program Files\Autodesk\AutoCAD 2014\Acade\")
* (corresponds with global GBL_WD_BASEINSTALL)

* %DS_DIR% = "C:\ACADE Projects\Project Databases\"
* (example: "C:\Users\{username}\AppData\Roaming\Autodesk\AutoCAD Electrical 2014\R19.1\enu\Support\")
* (corresponds with global GBL_WD_DOCSETBASE)

* %WD_DIR% = "C:\ACADE Shared Directories\ACADE"
* (example: "C:\Users\{username}\Documents\AcadE 2014\AeData\")
* (corresponds with global GBL_WD_DOCSETWDBASE)

%SL_DIR% = "C:\ACADE Shared Directories\ACADE\Libs\"
* (example "C:\Users\Public\Documents\Autodesk\Acade 2014\Libs\")
* (corresponds with global GBL_WD_BASELIBS)

%ACAD_SUP_FIRST% = "c:\ACADE Shared Directories\ACADE\Support\"
* %ACAD_SUP_LAST% = last path listed under ACAD support file path list
*
******************
*
* "*" in first column disables the line (i.e. comments it out)
*
************************************************************************************
* NOTE: internal global variables can be preset using a "SETQ:" prefix.
* Format is: "SETQ:", global variable name, value, description
* By default, "value" is evaluated as a character string. To force it to read as an
* integer, real, or nil value, preceed value with ' character.
* ex: SETQ:GBL_wd_pi,'3.1416, evaluates as "real" number
* ex: SETQ:GBL_wd_int,'7, evaluates as "integer" number
* ex: SETQ:GBL_wd_xx,'nil, sets global to "nil" or null value
* ex: SETQ:GBL_wd_str,romans.shx, defaults to character string value
*
************************************************************************************
* Program executable, dialog, and support files
************************************************************************************
WD,%PF_DIR%/support/%WD_LANG%/,AutoCAD Electrical dialog files, xls templates, and other support files

************************************************************************************
* User temp file folder, CANNOT shared with other users
************************************************************************************
WD_USER,%DS_DIR%/user,AutoCAD Electrical user temp file folder
*WD_USER,C:/ACADE Projects/Project Databases/USER/

************************************************************************************
* Symbol Insertion and Library Paths
************************************************************************************
WD_LIB,%SL_DIR%/NFPA;%SL_DIR%/NFPA/1-;C:/ACADE Shared Directories/ACADE/Bastian/User Blocks;%SL_DIR%/pneu_iso125;%SL_DIR%/pid;%SL_DIR%/hyd_iso125, schem, 1-line, and pneumatic/pid/hydraulic default paths
WD_PNL,%SL_DIR%/panel, panel layout symbol library base folder
*WD_CIRCBUILDER_FNAM,"ace_circuit_builder.xls",Circuit Builder spreadsheet file name
WD_INSCOMPDLG,C:/ACADE Shared Directories/ACADE/Bastian/User Blocks/
*WD_INSFPDLG,x:/some path/,to override starting path for INS PNL COMP browse button
*WD_INSCKTDLG,x:/some path/,to override starting path for INS CKT file selection dialog
WD_WBLOCKDLG,C:/ACADE Shared Directories/ACADE/Bastian/User Blocks/
*WD_PICKLIST,%WD_DIR%/%WD_LANG%/catalogs/wd_picklist.mdb,ins component from catalog list file
*WD_USERCKTDIR,x:/some path/,default folder for "USER CKTS"
*PLC_ADDRESS_FORMAT,I:00%10%2;I:%1%2/00;--;O:00%10%2;O:%1%2/00;--;,default PLC address formats for "Quick pick"
************************************************************************************
* Catalog Parts Database Path
************************************************************************************
WD_CAT,C:/ACADE Shared Directories/ACADE/Catalogs/
*WD_XCAT,x:/some path/wd_xcat.lsp,to override catalog look-up and call user's external routine

************************************************************************************
* Project and drawing-related paths and settings
************************************************************************************
*WD_PROJ,%WD_DIR%/proj/, AutoCAD Electrical default project data folder
*WD_PICKPRJDLG,%WD_DIR%/Proj/, to override starting subdir for "PICK PROJ" button
WD_PROJ,C:/ACADE Projects/, AutoCAD Electrical project data folder
WD_PICKPRJDLG,C:/ACADE Projects/, to override starting subdir for "PICK PROJ" button
*WD_OPEN_DWG,(command "_.ZOOM" "_E"),AutoLISP prog or expression to autoexecute when dwg opened from PROJ dlg
*WD_ZIP,c:/program files/winzip/winzip32.exe,full path/name of zipping utility executable
*WD_ZIP,c:/program files/WinRAR/rar.exe, full path/name for alternate zipping utility
*WD_PROMPT_SAVE,1,set to 1 to trigger "Save changes" prompt when using open dwg next/prev arrows buttons

************************************************************************************
* Plotting & Reporting Path
************************************************************************************
WD_DWF_PC3,DWF6 ePlot.pc3,alternate "dwf" plotter config pc3 file reference
*WD_PLOT2FILEDIR,x:/some path/,target dir for AutoCAD Electrical's Batch Plot to File
*WD_SAVE2FILEDLG,x:/some path/,default save directory for reports
*WD_SET_FILES,x:/some path/,folder for report ".set" files

************************************************************************************
* Menu & Slide Path
************************************************************************************
*WD_MENU,C:/ACADE Shared Directories/Acade 2019/AeData/NewStandards/Bastian/Support/,to override default schem icon menu
*WD_PMENU,%DS_DIR%/mypnlmnu.dat,to override default panel layout icon menu
*WD_SLB,x:/some path/,to override path pointing to ".slb" slide lib support files

************************************************************************************
* Misc
************************************************************************************
WD_SUP_ALT,C:/ACADE Shared Directories/ACADE/PLC/,to include an alternate support path (searched before normal AutoCAD Electrical support path)
*WD_ACADPATHFIRST,1,if 1 then check ACAD path first before AutoCAD Electrical paths
WD_SCR_DLG,C:/ACADE Shared Directories/ACADE/Bastian/Scripts/,to override starting path for SCRIPT file selection dialog
WD_MSG,ENU (English-US),map internal prompts and messages to specific language column in wd_msg.mdb file
*WD_LASTSURF,%DS_DIR%/user/lastsurf.tmp,extern text file listing last surfed item
*WD_PRINT_FONT,"Courier New" 10, Dialog's PRINT report font name and optional point size. Put quotes around multi-word font names (ex: WD_PRINT_FONT,"Times New Roman" 10)
*SETQ:GBL_wd_qsok,1,Project database freshen operations: 1=suppress prompt for QSAVE
*SETQ:GBL_wd_backup_prompt,1,ZIP backup prompt before project-wide operations: 1=prompt for backup
*SETQ:GBL_wd_green_x_at_connection,0,Insert wire - dynamic green x's at connections: 0=suppress
*SETQ:GBL_wd_xref_mtext_pinfont,"romans.shx",graphical cross-references - font for the "terminal pin" text
*SETQ:GBL_wd_xref_mtext_pinsize,"0.67",ratio pin/reference text size
SETQ:GBL_wd_wnum_noduplicate_chk,'("GND" "24VDC" "COM")
*SETQ:GBL_wd_colga_leaderlay,"SYMS"
*SETQ:GBL_wd_colga_textlay,"MISC"
*SETQ:GBL_wd_break_parameters,'(0.85 40.0), distance ratio/angle for PLC I/O and connector jagged break lines
*SETQ:GBL_wd_default_plot_outputdevice,"Default Windows System Printer.pc3", Default output device
*SETQ:GBL_wd_importdbUppercase,0, if 0 then Import from Project Database unchecks Force values to upper case
Message 13 of 14
randy.brunette
in reply to: amigaman68

I'm not sure why you are getting those results.

If you can send the WD.ENV and the WD_LOAD.LSP files to me directly at randy.brunette@brutec.com I'll do some testing and see if I can determine what is happening.

Message 14 of 14
amigaman68
in reply to: randy.brunette

I will send first thing tomorrow

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost