odbx help

Discussion in 'AutoCAD' started by BTO, Dec 17, 2004.

  1. BTO

    BTO Guest

    hello,
    After having read much here, I write my first lisps with odbx, this kind of
    little routine :

    (defun c:eek:dbx_freeze_layers ( / File1 odbx )
    (setq File1 (getfiled "Selection du fichier" "C:/traitement/" "dwg" 0 ))
    (setq odbx (vla-getinterfaceobject (vlax-get-acad-object)
    "ObjectDBX.AxDbDocument.16"))
    (vla-open odbx File1 )
    (princ "\nCalques gelés :")
    (vlax-for layer (vla-get-Layers odbx )
    (vla-put-Freeze layer :vlax-true)
    (princ (strcat "\n" (vla-get-name layer)))
    )
    (vla-saveas odbx File1 )
    (vlax-release-object odbx)
    )

    but i can't find any answer about how to modify a variable (I sought with
    google, google group ect, here...).

    with vl I use someting like :

    (vl-load-com)
    (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object)))
    (vla-GetVariable thisdrawing "fillmode")
    (vla-SetVariable thisdrawing "fillmode" 0 )

    or

    (vla-get-name (vla-get-activelayer thisdrawing ))

    but :
    (vla-get-name (vla-get-activelayer odbx )) doesn't work and everything that
    needs (vla-get-activedocument... too


    second point, I tried to use AuditInfo method, but without any success via
    odbx because i need (vla-get-activedocument.
    (vla-AuditInfo thisdrawing :vlax-true) works

    Any help is welcome.
    thx,

    My english writing is bad, but i will understand you

    Bruno Toniutti.
     
    BTO, Dec 17, 2004
    #1
  2. BTO

    Jeff Mishler Guest

    That is one of the limitations of ODBX, System variables are not accessible.
     
    Jeff Mishler, Dec 17, 2004
    #2
  3. BTO

    BTO Guest

    thanks you Jeff,
    good explanation why i found nothing about it

    Bruno Toniutti
     
    BTO, Dec 20, 2004
    #3
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.