• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Active Contributor
    Posts: 44
    Registered: ‎06-04-2004

    Create database resident system variable

    292 Views, 6 Replies
    04-20-2009 06:50 PM
    Is it possible to create a database resident system variable? My desire is to create a system variable that I can use to expose results of my program, and/or let the user set values that the program can use. I thought I saw an example somewhere, but I can't seem to find it now.

    Any Ideas?

    Thanks

    HomeBoy Out
    Please use plain text.
    *Tony Tanzillo

    Re: Create database resident system variable

    04-20-2009 08:48 PM in reply to: HomeBoyLV
    No way to create your own system variables.

    You can store data in dictionaries and provide your own UI or command to let
    the user view or change them.

    --
    http://www.caddzone.com

    AcadXTabs: MDI Document Tabs for AutoCAD 2009
    Supporting AutoCAD 2000 through 2009

    http://www.acadxtabs.com

    Introducing AcadXTabs 2010:
    http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


    wrote in message news:6166438@discussion.autodesk.com...
    Is it possible to create a database resident system variable? My desire is
    to create a system variable that I can use to expose results of my program,
    and/or let the user set values that the program can use. I thought I saw an
    example somewhere, but I can't seem to find it now. Any Ideas? Thanks
    HomeBoy Out
    Please use plain text.
    Distinguished Contributor
    Posts: 1,691
    Registered: ‎12-15-2003

    Re: Create database resident system variable

    04-20-2009 11:03 PM in reply to: HomeBoyLV
    See AutoCAD help for info on USERI1-5 & USERR1-5 system variables. Obvious shortcomings are limited number of variables and knowing they aren't/won't be used by another person/program.
    Please use plain text.
    *LE

    Re: Create database resident system variable

    04-21-2009 09:53 AM in reply to: HomeBoyLV

    Or.... P/Invoke:

     

     acedGetEnv and acedSetEnv


    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <HomeBoyLV>
    Is it possible to create a database resident
    system variable? My desire is to create a system variable that I can use to
    expose results of my program, and/or let the user set values that the program
    can use. I thought I saw an example somewhere, but I can't seem to find it
    now. Any Ideas? Thanks HomeBoy Out
    Please use plain text.
    *Tony Tanzillo

    Re: Create database resident system variable

    04-21-2009 11:01 AM in reply to: HomeBoyLV
    I think you're confusing storing data in a DWG file with
    storing it in the registry.

    --
    http://www.caddzone.com

    AcadXTabs: MDI Document Tabs for AutoCAD 2009
    Supporting AutoCAD 2000 through 2009

    http://www.acadxtabs.com

    Introducing AcadXTabs 2010:
    http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


    wrote in message news:6166949@discussion.autodesk.com...
    Or.... P/Invoke:

    acedGetEnv and acedSetEnv

    Is it possible to create a database resident system variable? My desire is
    to create a system variable that I can use to expose results of my program,
    and/or let the user set values that the program can use. I thought I saw an
    example somewhere, but I can't seem to find it now. Any Ideas? Thanks
    HomeBoy Out
    Please use plain text.
    *LE

    Re: Create database resident system variable

    04-21-2009 11:08 AM in reply to: HomeBoyLV
    Thanks Tony and yes,
    Please ignore what I just previously posted :smileyhappy:


    ////
    "Tony Tanzillo"
    I think you're confusing storing data in a DWG file with
    storing it in the registry.
    Please use plain text.
    Distinguished Contributor
    Artvegas
    Posts: 104
    Registered: ‎04-21-2011

    Re: Create database resident system variable

    05-05-2012 08:19 AM in reply to: *LE

    Very old post, but from AutoCAD 2011 onwards it is possible to create a custom system variable by adding a key to the registry.

     

    Your user might need elevated UAC permissions to be able to add it to the registry's local-machine hive, but this can be achieved by your installer.

     

    There's more information contained at the bottom of the following through-the-interface post for those who are interested Custom System Variable Link

     

    Art

    Please use plain text.