System Variable

Discussion in 'AutoCAD' started by raffi, Jul 2, 2004.

  1. raffi

    raffi Guest

    Hi
    I need to know 2 var of cad
    1-AutoCAD window color in model space var
    2-enable materials & textures in render option
    can anyone help me?
     
    raffi, Jul 2, 2004
    #1
  2. raffi

    Matt W Guest

    I'm not sure about the render option but the Model Space background color is
    held in the system registry under...

    HKEY_CURRENT_USER\......\Profiles\ [Your Profile Name]\Drawing
    Window\Background

    --
    Matt W

    The difference between genius and stupidity is that genius has its limits.
    | Hi
    | I need to know 2 var of cad
    | 1-AutoCAD window color in model space var
    | 2-enable materials & textures in render option
    | can anyone help me?
     
    Matt W, Jul 2, 2004
    #2
  3. raffi

    BillZ Guest

    Screen color is a property:

    ;;12/8/03 to change screen color

    (defun col_bkgr (/ )

    (if (= (getenv "Background") "0")
    (progn
    (vlax-put-property (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "ModelCrosshairColor" 000)
    (vlax-put-property (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "GraphicsWinModelBackgrndColor" 16777215)
    )
    (progn
    (vlax-put-property (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "ModelCrosshairColor" 16777215)
    (vlax-put-property (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "GraphicsWinModelBackgrndColor" 000)
    )
    )

    (princ)
    )
    (princ)


    Bill
     
    BillZ, Jul 2, 2004
    #3
  4. raffi

    raffi Guest

    OK Matt W
    you are correct BUT how can i change them?
    (Background color,enable materials & textures)
    od you know any other way?
     
    raffi, Jul 2, 2004
    #4
  5. raffi

    GrumpyChick Guest

    just go to your Tools, Options from the menu bar anch choos display tab and change the color there
     
    GrumpyChick, Jul 2, 2004
    #5
  6. raffi

    raffi Guest

    I know that
    you mean there is no way to do that from lisp?
     
    raffi, Jul 2, 2004
    #6
  7. raffi

    BillZ Guest

    2-enable materials & textures in render option
    Render is an arx app so I don't think the options can be set using lisp.
    I may be wrong though.

    Bill
     
    BillZ, Jul 2, 2004
    #7
  8. raffi

    Dr Fleau Guest

    For the background, use this
    (VBASTMT
    Thisdrawing.application.preferences.Display.GraphicsWinModelBackgrndColor
    = 0)

    Of course, 0 is the colour you want to get to.

    Kudos to whoever gave this to me.

    Pierre
     
    Dr Fleau, Jul 2, 2004
    #8
  9. raffi

    raffi Guest

    KO Bill
    But I want to control this (from menu)
    Options / system / Properties... / Render options / Enable
    materials & Enable textures
     
    raffi, Jul 2, 2004
    #9
  10. raffi

    John Uhden Guest

    Maybe this will help some. Watch for word wrap.

    (defun GSHEIDI (Bits / Path Flags)
    ;; c. 2003, John F. Uhden, Cadlantic
    ;; Special variables that can be altered only by editing the registry.

    ;; Pass it a list of integers, negative to turn off and positive to turn on.
    ;; Example:
    ;; (GSHEIDI '(16384 32766 16 131072))
    ;; Bit 0 (1) = Flat Shaded
    ;; Bit 1 (2) = Wireframe
    ;; Bit 2 (4) = BoundingBox
    ;; Bit 3 (8) = Discard Back Faces
    ;; Bit 4 (16) = Materials
    ;; Bit 5 (32) =
    ;; Bit 6 (64) = Isolines always on top
    ;; Bit 7 (128) =
    ;; Bit 8 (256) =
    ;; Bit 9 (512) = Dynamic Tesselation
    ;; Bit 10 (1024) =
    ;; Bit 11 (2048) =
    ;; Bit 12 (4096) =
    ;; Bit 13 (8192) = Adaptive Degradation
    ;; Bit 14 (16384) = Render
    ;; Bit 15 (32768) = Lights
    ;; Bit 16 (65536) =
    ;; Bit 17 (131072) = Textures
    ;; Bit 18 (262144) = High Quality Transparency
    ;; Bit 19 (524288) = Low Quality Transparency (with Bit 18)
    (vl-load-com)
    (setq Path
    (strcat
    "HKEY_CURRENT_USER\\"
    (vlax-product-key)
    "\\3DGS Configuration\\GSHEIDI10"
    )
    )
    (setq Flags (vl-registry-read Path "Flags"))
    (foreach Bit Bits
    (setq Flags
    (if (minusp Bit)
    (boole 4 (- Bit) Flags) ; remove if present
    (boole 7 Bit Flags) ; add if not present
    )
    )
    )
    (vl-registry-write Path "Flags" Flags)
    )

    Please let us know if you find the meaning of any undefined bits.
     
    John Uhden, Jul 5, 2004
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.