| Author |
Message |
BTO
Guest
|
Posted:
Fri Dec 17, 2004 8:35 pm Post subject:
odbx help |
|
|
hello,
After having read much here, I write my first lisps with odbx, this kind of
little routine :
(defun c:odbx_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.
|
|
| Back to top |
|
 |
Jeff Mishler
Guest
|
Posted:
Fri Dec 17, 2004 10:05 pm Post subject:
Re: odbx help |
|
|
That is one of the limitations of ODBX, System variables are not accessible.
--
Jeff
check out www.cadvault.com
"BTO" <NOSPAMacad@berim.fr> wrote in message news:41c2fe4b$1_1@newsprd01...
| Quote: | hello,
After having read much here, I write my first lisps with odbx, this kind
of
little routine :
(defun c:odbx_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.
|
|
|
| Back to top |
|
 |
BTO
Guest
|
Posted:
Mon Dec 20, 2004 1:44 pm Post subject:
Re: odbx help |
|
|
| Quote: | That is one of the limitations of ODBX, System variables are not
accessible.
|
thanks you Jeff,
good explanation why i found nothing about it
Bruno Toniutti
|
|
| Back to top |
|
 |
|
|
|
|