associate to a 'dws' file (standards)

Discussion in 'AutoCAD' started by jclaidler, Apr 8, 2004.

  1. jclaidler

    jclaidler Guest

    Is there an easy way to associate a drawings to a standards file (dws) ??

    Thanks for any help.
     
    jclaidler, Apr 8, 2004
    #1
  2. ruul morawetz, Apr 8, 2004
    #2
  3. jclaidler

    jclaidler Guest

    Thanks, this does load dthe dwf file into the drawing.
    But you stil have to open the standards dialog to activate it.

    Is there a way this can be incorporated into the program ??
     
    jclaidler, Apr 8, 2004
    #3
  4. jclaidler

    jclaidler Guest

    oops.. dws (not dwf)
     
    jclaidler, Apr 8, 2004
    #4
  5. I have no idea about an elegant way, but what I found working is
    unloading and reloading the arx file after modifying the dictionary.
    which of course fails, if the unload is hindered by another arx.

    (arxunload "acstd")
    (arxload "acstd")

    but as I'm not using the standards feature I haven't spent much time
    with it.

    hopefully it works for you.
    ;-)

    ruul
     
    ruul morawetz, Apr 8, 2004
    #5
  6. jclaidler

    jclaidler Guest

    Thanks. How about 'deleting' dws files from the drawing ??
     
    jclaidler, Apr 12, 2004
    #6
  7. ; remove standards dictionary entries
    ; by ruul
    (defun c:remstd ( / dname)
    (setq dname "AcStStandard")
    (cond
    ((null (setq de (dictremove (namedobjdict) dname))))
    (T (entdel de)(princ (strcat "\n" dname " removed. ")))
    )
    (prin1)
    )

    hth
    ruul
     
    ruul morawetz, Apr 12, 2004
    #7
  8. oh, forgot to set "de" local.

    (defun c:remstd ( / dname de)
    ....

    ruul
     
    ruul morawetz, Apr 12, 2004
    #8
  9. you're welcome
    AFAIK it's a profile thing which plugins are used.

    attached is a file to set the registry entries in the current profile
    for 2K4 and 2K5.

    functions:
    SETSTD - settings according to your bmp (only styles active).
    SETSTDALL - activate all 4 plugins
    GETSTD - show current settings

    limited testing only.

    You could also use a .REG file before starting AutoCAD.

    hth
    ruul

    ;------------------------------------------------------
    ; read or set STANDARDS plugin usage in registry
    ; for the current profile in 2K4 and 2K5
    ; no warranties, almost no testing done.
    ; by ruul
    ;------------------------------------------------------
    ; defined commands:
    ; SETSTD - only Dim- and Textstyle set
    ; SETSTDALL - all 4
    ; GETSTD - list settings
    ;------------------------------------------------------
    ; parameters:
    ; lplugmode - list of dotted pairs
    ; '((pluginname . value)...)
    ; rw - T - write to registry
    ; nil - only show settings
    (defun rm:StdModes (lplugmode rw / sRegStdPlug tmp n)
    (vl-load-com)
    (setq sRegStdPlug
    (strcat "HKEY_CURRENT_USER\\"
    (vlax-product-key)
    "\\Profiles\\"
    (getvar "CPROFILE")
    "\\Drawing Check\\SelectedPlugins"
    )
    )

    (foreach n lplugmode
    (cond
    (rw
    (vl-registry-write sRegStdPlug
    (car n)
    (cdr n)
    )
    )
    (T
    (princ (strcat "\n" (car n) ": "))
    (setq tmp (vl-registry-read sRegStdPlug (car n)))
    (princ tmp)
    )
    )
    )
    (prin1)
    )
    ;------------------------------------------------------
    ; usage samples:
    ;------------------------------------------------------
    ; activating Dimstyle and Textstyle checking
    ; deactivating Layer- and Linetype checking
    (defun c:SetStd ()
    (rm:StdModes '(("AcStDStyle.AcStDimStyle2" . 1)
    ("AcStLay.AcStLayer2" . 0)
    ("AcStLtype.AcStLinetype2" . 0)
    ("AcStTStyle.AcStTextStyle2" . 1)
    )
    T ; write mode
    )
    (prin1)
    )
    ;------------------------------------------------------
    ; activating all 4 plugins
    (defun c:SetStdAll ()
    (rm:StdModes '(("AcStDStyle.AcStDimStyle2" . 1)
    ("AcStLay.AcStLayer2" . 1)
    ("AcStLtype.AcStLinetype2" . 1)
    ("AcStTStyle.AcStTextStyle2" . 1)
    )
    T ; write mode
    )
    (prin1)
    )
    ;------------------------------------------------------
    ; retrieving current settings
    (defun c:GetStd ()
    (rm:StdModes '(("AcStDStyle.AcStDimStyle2" . 1)
    ("AcStLay.AcStLayer2" . 1)
    ("AcStLtype.AcStLinetype2" . 1)
    ("AcStTStyle.AcStTextStyle2" . 1)
    )
    nil ; read mode
    )
    (prin1)
    )
    ;------------------------------------------------------
    (prin1)
    ;------------------------------------------------------
     
    ruul morawetz, Apr 12, 2004
    #9
  10. jclaidler

    jclaidler Guest

    Thanks. Works great.
     
    jclaidler, Apr 13, 2004
    #10
  11. you're welcome.

    ruul
     
    ruul morawetz, Apr 14, 2004
    #11
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.