CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 07-27-2011, 03:22 PM
coroto coroto is offline
Registered User
 
Join Date: Sep 2003
Location: Santa Rosa, CA
Posts: 75
Question Environment Variables

With the integration kit function sd-sys-getenv one can inquire the environment variable values from the OS.

Is there a way (from LISP inside of Modeling) to actually create or set new environment variables?

You can do these things from Drafting using GETENV and PUTENV (the latter being one of those "undocumented" keywords). I thought there might be equivalents in Modeling but so far I haven't figured out how to create/set environment variables there.

Thanks for any assistance,
Reply With Quote
  #2  
Old 07-28-2011, 04:55 AM
Mike Swartz's Avatar
Mike Swartz Mike Swartz is offline
Registered User
 
Join Date: Jan 2004
Location: Fort Collins
Posts: 322
Re: Environment Variables

You could use SD-SYS-EXEC to run either a set or setx command.

Code:
(sd-sys-exec command)
Description: 
Forks an operating system shell and executes command in that shell. 
Returns the operating system return value of the command.
Note: If you want to pass a filename (pathname) as argument to this function 
you have to convert the filename to the platform specific notation using the function 
sd-convert-filename-to-platform. 
Parameters: 
command {STRING} - the operating system command to execute 
Return value: 
return-code {FIXNUM} 
the value returned by the command to the OS shell
Reply With Quote
  #3  
Old 07-28-2011, 08:15 AM
coroto coroto is offline
Registered User
 
Join Date: Sep 2003
Location: Santa Rosa, CA
Posts: 75
Re: Environment Variables

That suggestion works, but not for the currently running session of Modeling. http://technet.microsoft.com/en-us/library/cc755104(WS.10).aspx

I was looking for a way to set an environment variable that the current session could later inquire and act upon.
Reply With Quote
  #4  
Old 09-02-2011, 11:10 AM
John van Doorn's Avatar
John van Doorn John van Doorn is offline
Registered User
 
Join Date: Nov 2002
Location: The Netherlands
Posts: 83
Re: Environment Variables

I think (putenv "myvar" "1") should work
__________________
High performance CAD workstations
Please visit us at https://www.cadware.nl
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:30 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.