AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

adt 2 layerkey problem

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
305 Views, 9 Replies

adt 2 layerkey problem

On a new drawing, why in ADT 2 will this not work even after setting the
layerkey

(setq lk (cdr (assoc 9 (entget (cdr (car (reverse (dictsearch (namedobjdict)
"aec_vars"))))))))

until you save the drawing, close it and reopen it??


ADT 2i and 3.3 it works fine. It is really frustrating me!

CJ
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

CJ,

I'm not sure why, what is the error you are getting... It could be that we
changed the DXF code that is used. Post the list that you get before the
assoc 9.

By the way... Why are you LISP'ers using the getting the first element (car)
of a reversed list? Why don't you use "Last"???

(setq lk (cdr (assoc 9 (entget (cdr (last (dictsearch (namedobjdict))))))))

and you say VBA is too hard

Cheers,

Peter Funk
API Product Manager
Building Industry Division
Autodesk, Inc.

"CJ Follmer" wrote in message
news:17BA47675C827136C7D6EE890696A795@in.WebX.maYIadrTaRb...
> On a new drawing, why in ADT 2 will this not work even after setting the
> layerkey
>
> (setq lk (cdr (assoc 9 (entget (cdr (car (reverse (dictsearch
(namedobjdict)
> "aec_vars"))))))))
>
> until you save the drawing, close it and reopen it??
>
>
> ADT 2i and 3.3 it works fine. It is really frustrating me!
>
> CJ
>
>
Message 3 of 10
Anonymous
in reply to: Anonymous

Hey now I didn't say VBA was too hard, it is if you haven't had the time to
jump into it. Lisp isn't really hard either once you've learned it, neither
is driving, walking, using Autocad or talking. You don't have to sell me on
VBA, I'm just haven't had the time to do lisp much less learn VBA. Sorry if
I'm ranting, I've got a newborn. 😉

I'm trying to update my leader routine to scan the layer key and give the
user the option to choose a layer from their current layer key. It works
fine in 2i and 3 but if it's a new drawing in 2, my routine crashes because
it's trying to put nil into a dialog box. Right now I've added a check to
put an UNAVAILABLE in if my code returns nil.

Example of returned list before SAVING, CLOSING AND REOPENING:
((-1 . ) (0 . "AEC_VARS_ARCHBASE") (5 . "A7") (102 .
"{ACAD_REACTORS") (330 . ) (102 . "}") (330 .
name: 1519558>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
"AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 . "AecImpDictRecord")
(102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
"AecDbDictRecord")
(100 . "AecDbVars") (100 . "AecDbVarsArchBase") (270 . 0) (70 . 0) (71 . 1)
(72
. 0) (73 . 0) (74 . 0) (75 . 0) (76 . 0) (77 . 0) (40 . 10.0) (41 . 40.0)
(42 .
6.0) (43 . 2.0) (44 . 34.0) (45 . 42.0) (46 . 6.0) (47 . 7.0) (48 . 4.0) (49
.
24.0) (50 . 11.0) (51 . 14.0))

Example of returned list after SAVING, CLOSING AND REOPENING:
((-1 . ) (0 . "AEC_VARS_DWG_SETUP") (5 . "2F0") (102 .
"{ACAD_REACTORS") (330 . ) (102 . "}") (330 .
name: 16a2630>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
"AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 . "AecImpDictRecord")
(102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
"AecDbDictRecord")
(100 . "AecDbVars") (100 . "AecDbVarsDwgSetup") (70 . 1) (71 . 31) (72 . 4)
(73
. 4) (74 . 0) (75 . 0) (76 . 2) (77 . 2) (78 . 4) (79 . 2) (10 0.0 0.0 0.0)
(11
0.0 0.0 0.0) (50 . 0.0) (40 . 1.0) (41 . 1.0) (42 . 0.09375) (44 . 0.0625)
(45
. 96.0) (46 . 0.3048) (90 . 0) (91 . 4096) (92 . 0) (270 . 56) (271 . 2)
(272 .
130) (273 . 2) (2 . " Sq.Ft.") (3 . " Cu.Ft.") (4 . "ACADARCH") (6 . "L120")
(7
. "'") (8 . "m") (330 . ) (9 . "SUDA Layers") (43 .
0.5)
(5 . "C:\\Program Files\\AutoCAD Architectural
2\\Content\\Layers\\AecLayerStd.dwg"))


I will admit that this isn't important for my office much longer as we are
going to be moving to 3.3 after the current project is done, but for reasons
of compatibility, I would really like to understand my flaw.

thanks
CJ


"Peter Funk - Autodesk, Inc" wrote in message
news:9051B7545F42DBE6BF637E55617A16EF@in.WebX.maYIadrTaRb...
> CJ,
>
> I'm not sure why, what is the error you are getting... It could be that we
> changed the DXF code that is used. Post the list that you get before the
> assoc 9.
>
> By the way... Why are you LISP'ers using the getting the first element
(car)
> of a reversed list? Why don't you use "Last"???
>
> (setq lk (cdr (assoc 9 (entget (cdr (last (dictsearch
(namedobjdict))))))))
>
> and you say VBA is too hard
>
> Cheers,
>
> Peter Funk
> API Product Manager
> Building Industry Division
> Autodesk, Inc.
>
> "CJ Follmer" wrote in message
> news:17BA47675C827136C7D6EE890696A795@in.WebX.maYIadrTaRb...
> > On a new drawing, why in ADT 2 will this not work even after setting the
> > layerkey
> >
> > (setq lk (cdr (assoc 9 (entget (cdr (car (reverse (dictsearch
> (namedobjdict)
> > "aec_vars"))))))))
> >
> > until you save the drawing, close it and reopen it??
> >
> >
> > ADT 2i and 3.3 it works fine. It is really frustrating me!
> >
> > CJ
> >
> >
>
>
Message 4 of 10
Anonymous
in reply to: Anonymous

CJ,

You've got two different objects there! When you get the list back from the
(dictsearch (namedobjdict)"aec_vars"), you need to walk the list using
"length" and "nth", looking for (3. "AEC_VARS_DWG_SETUP "), then take the
next element in the list (350 . ) and do the entget
of the cdr. Currently your code is blindly taking the last element in the
list. This may or may not be the correct element, in ADT 2.0, it looks like
you got the AecDbVarsArchBase and not AecDbVarsDwgSetup object.

Cheers,

Peter Funk
API Product Manager
Building Industry Division
Autodesk, Inc.



"CJ Follmer" wrote in message
news:00479DB0E25864D527248BC90701D38D@in.WebX.maYIadrTaRb...
> Hey now I didn't say VBA was too hard, it is if you haven't had the time
to
> jump into it. Lisp isn't really hard either once you've learned it,
neither
> is driving, walking, using Autocad or talking. You don't have to sell me
on
> VBA, I'm just haven't had the time to do lisp much less learn VBA. Sorry
if
> I'm ranting, I've got a newborn. 😉
>
> I'm trying to update my leader routine to scan the layer key and give the
> user the option to choose a layer from their current layer key. It works
> fine in 2i and 3 but if it's a new drawing in 2, my routine crashes
because
> it's trying to put nil into a dialog box. Right now I've added a check to
> put an UNAVAILABLE in if my code returns nil.
>
> Example of returned list before SAVING, CLOSING AND REOPENING:
> ((-1 . ) (0 . "AEC_VARS_ARCHBASE") (5 . "A7") (102 .
> "{ACAD_REACTORS") (330 . ) (102 . "}") (330 .

> name: 1519558>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
> "AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 .
"AecImpDictRecord")
> (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
> "AecDbDictRecord")
> (100 . "AecDbVars") (100 . "AecDbVarsArchBase") (270 . 0) (70 . 0) (71 .
1)
> (72
> . 0) (73 . 0) (74 . 0) (75 . 0) (76 . 0) (77 . 0) (40 . 10.0) (41 . 40.0)
> (42 .
> 6.0) (43 . 2.0) (44 . 34.0) (45 . 42.0) (46 . 6.0) (47 . 7.0) (48 . 4.0)
(49
> .
> 24.0) (50 . 11.0) (51 . 14.0))
>
> Example of returned list after SAVING, CLOSING AND REOPENING:
> ((-1 . ) (0 . "AEC_VARS_DWG_SETUP") (5 . "2F0") (102
.
> "{ACAD_REACTORS") (330 . ) (102 . "}") (330 .

> name: 16a2630>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
> "AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 .
"AecImpDictRecord")
> (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
> "AecDbDictRecord")
> (100 . "AecDbVars") (100 . "AecDbVarsDwgSetup") (70 . 1) (71 . 31) (72 .
4)
> (73
> . 4) (74 . 0) (75 . 0) (76 . 2) (77 . 2) (78 . 4) (79 . 2) (10 0.0 0.0
0.0)
> (11
> 0.0 0.0 0.0) (50 . 0.0) (40 . 1.0) (41 . 1.0) (42 . 0.09375) (44 . 0.0625)
> (45
> . 96.0) (46 . 0.3048) (90 . 0) (91 . 4096) (92 . 0) (270 . 56) (271 . 2)
> (272 .
> 130) (273 . 2) (2 . " Sq.Ft.") (3 . " Cu.Ft.") (4 . "ACADARCH") (6 .
"L120")
> (7
> . "'") (8 . "m") (330 . ) (9 . "SUDA Layers") (43 .
> 0.5)
> (5 . "C:\\Program Files\\AutoCAD Architectural
> 2\\Content\\Layers\\AecLayerStd.dwg"))
>
>
> I will admit that this isn't important for my office much longer as we are
> going to be moving to 3.3 after the current project is done, but for
reasons
> of compatibility, I would really like to understand my flaw.
>
> thanks
> CJ
>
>
> "Peter Funk - Autodesk, Inc" wrote in message
> news:9051B7545F42DBE6BF637E55617A16EF@in.WebX.maYIadrTaRb...
> > CJ,
> >
> > I'm not sure why, what is the error you are getting... It could be that
we
> > changed the DXF code that is used. Post the list that you get before the
> > assoc 9.
> >
> > By the way... Why are you LISP'ers using the getting the first element
> (car)
> > of a reversed list? Why don't you use "Last"???
> >
> > (setq lk (cdr (assoc 9 (entget (cdr (last (dictsearch
> (namedobjdict))))))))
> >
> > and you say VBA is too hard
> >
> > Cheers,
> >
> > Peter Funk
> > API Product Manager
> > Building Industry Division
> > Autodesk, Inc.
> >
> > "CJ Follmer" wrote in message
> > news:17BA47675C827136C7D6EE890696A795@in.WebX.maYIadrTaRb...
> > > On a new drawing, why in ADT 2 will this not work even after setting
the
> > > layerkey
> > >
> > > (setq lk (cdr (assoc 9 (entget (cdr (car (reverse (dictsearch
> > (namedobjdict)
> > > "aec_vars"))))))))
> > >
> > > until you save the drawing, close it and reopen it??
> > >
> > >
> > > ADT 2i and 3.3 it works fine. It is really frustrating me!
> > >
> > > CJ
> > >
> > >
> >
> >
>
>
Message 5 of 10
Anonymous
in reply to: Anonymous

Thanks for pointing out my problem.
<:^|

But why does it change? What happens when you close the drawing and then
reopen it that makes it work the way I first used. It works that way EVERY
time after the drawing has been closed and reopened. What's more, why does
it do this in 2 and not in 2i as my testing indicates? Well I suppose it's
really not important as the "issue" has been resolved and any of us still
using 2 should be promptly kicked in the seat and told to go to 3 because it
solves SO many problems anyway.

Thanks and have a great day.
CJ

BTW, I am hoping to get a good VBA book soon (still have some birthday money
left) and start learning it.

"Peter Funk - Autodesk, Inc" wrote in message
news:8294CD1C4EFF4EFEDDE4D6A03A6F334E@in.WebX.maYIadrTaRb...
> CJ,
>
> You've got two different objects there! When you get the list back from
the
> (dictsearch (namedobjdict)"aec_vars"), you need to walk the list using
> "length" and "nth", looking for (3. "AEC_VARS_DWG_SETUP "), then take the
> next element in the list (350 . ) and do the entget
> of the cdr. Currently your code is blindly taking the last element in the
> list. This may or may not be the correct element, in ADT 2.0, it looks
like
> you got the AecDbVarsArchBase and not AecDbVarsDwgSetup object.
>
> Cheers,
>
> Peter Funk
> API Product Manager
> Building Industry Division
> Autodesk, Inc.
>
>
>
> "CJ Follmer" wrote in message
> news:00479DB0E25864D527248BC90701D38D@in.WebX.maYIadrTaRb...
> > Hey now I didn't say VBA was too hard, it is if you haven't had the time
> to
> > jump into it. Lisp isn't really hard either once you've learned it,
> neither
> > is driving, walking, using Autocad or talking. You don't have to sell
me
> on
> > VBA, I'm just haven't had the time to do lisp much less learn VBA. Sorry
> if
> > I'm ranting, I've got a newborn. 😉
> >
> > I'm trying to update my leader routine to scan the layer key and give
the
> > user the option to choose a layer from their current layer key. It
works
> > fine in 2i and 3 but if it's a new drawing in 2, my routine crashes
> because
> > it's trying to put nil into a dialog box. Right now I've added a check
to
> > put an UNAVAILABLE in if my code returns nil.
> >
> > Example of returned list before SAVING, CLOSING AND REOPENING:
> > ((-1 . ) (0 . "AEC_VARS_ARCHBASE") (5 . "A7") (102
.
> > "{ACAD_REACTORS") (330 . ) (102 . "}") (330 .
>
> > name: 1519558>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
> > "AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 .
> "AecImpDictRecord")
> > (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
> > "AecDbDictRecord")
> > (100 . "AecDbVars") (100 . "AecDbVarsArchBase") (270 . 0) (70 . 0) (71 .
> 1)
> > (72
> > . 0) (73 . 0) (74 . 0) (75 . 0) (76 . 0) (77 . 0) (40 . 10.0) (41 .
40.0)
> > (42 .
> > 6.0) (43 . 2.0) (44 . 34.0) (45 . 42.0) (46 . 6.0) (47 . 7.0) (48 . 4.0)
> (49
> > .
> > 24.0) (50 . 11.0) (51 . 14.0))
> >
> > Example of returned list after SAVING, CLOSING AND REOPENING:
> > ((-1 . ) (0 . "AEC_VARS_DWG_SETUP") (5 . "2F0")
(102
> .
> > "{ACAD_REACTORS") (330 . ) (102 . "}") (330 .
>
> > name: 16a2630>) (100 . "AecDbObject") (102 . "{AEC_SUBOBJECT") (300 .
> > "AecImpDictRecord") (100 . "AecImpObj") (3 . "") (100 .
> "AecImpDictRecord")
> > (102 . "AEC_SUBOBJECT}") (102 . "{AEC_NULLOBJECT}") (100 .
> > "AecDbDictRecord")
> > (100 . "AecDbVars") (100 . "AecDbVarsDwgSetup") (70 . 1) (71 . 31) (72 .
> 4)
> > (73
> > . 4) (74 . 0) (75 . 0) (76 . 2) (77 . 2) (78 . 4) (79 . 2) (10 0.0 0.0
> 0.0)
> > (11
> > 0.0 0.0 0.0) (50 . 0.0) (40 . 1.0) (41 . 1.0) (42 . 0.09375) (44 .
0.0625)
> > (45
> > . 96.0) (46 . 0.3048) (90 . 0) (91 . 4096) (92 . 0) (270 . 56) (271 . 2)
> > (272 .
> > 130) (273 . 2) (2 . " Sq.Ft.") (3 . " Cu.Ft.") (4 . "ACADARCH") (6 .
> "L120")
> > (7
> > . "'") (8 . "m") (330 . ) (9 . "SUDA Layers") (43
.
> > 0.5)
> > (5 . "C:\\Program Files\\AutoCAD Architectural
> > 2\\Content\\Layers\\AecLayerStd.dwg"))
> >
> >
> > I will admit that this isn't important for my office much longer as we
are
> > going to be moving to 3.3 after the current project is done, but for
> reasons
> > of compatibility, I would really like to understand my flaw.
> >
> > thanks
> > CJ
> >
> >
> > "Peter Funk - Autodesk, Inc" wrote in message
> > news:9051B7545F42DBE6BF637E55617A16EF@in.WebX.maYIadrTaRb...
> > > CJ,
> > >
> > > I'm not sure why, what is the error you are getting... It could be
that
> we
> > > changed the DXF code that is used. Post the list that you get before
the
> > > assoc 9.
> > >
> > > By the way... Why are you LISP'ers using the getting the first element
> > (car)
> > > of a reversed list? Why don't you use "Last"???
> > >
> > > (setq lk (cdr (assoc 9 (entget (cdr (last (dictsearch
> > (namedobjdict))))))))
> > >
> > > and you say VBA is too hard
> > >
> > > Cheers,
> > >
> > > Peter Funk
> > > API Product Manager
> > > Building Industry Division
> > > Autodesk, Inc.
> > >
> > > "CJ Follmer" wrote in message
> > > news:17BA47675C827136C7D6EE890696A795@in.WebX.maYIadrTaRb...
> > > > On a new drawing, why in ADT 2 will this not work even after setting
> the
> > > > layerkey
> > > >
> > > > (setq lk (cdr (assoc 9 (entget (cdr (car (reverse (dictsearch
> > > (namedobjdict)
> > > > "aec_vars"))))))))
> > > >
> > > > until you save the drawing, close it and reopen it??
> > > >
> > > >
> > > > ADT 2i and 3.3 it works fine. It is really frustrating me!
> > > >
> > > > CJ
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Message 6 of 10
Anonymous
in reply to: Anonymous

CJ,

That's the thing about hacking at the objects directly. If you do, you need
to exercise case (make sure you know what you are getting before you use it)
because we don't care if we change the internal order of things. We can and
will change them without warning.

That's one of the advantages of working with the VBA interface. By providing
a wrapper around the objects, changes in the implementation of the object
won't hurt external applications. The other is (setq lk (cdr (assoc 9
(entget (cdr (last (dictsearch (namedobjdict "aec_vars")))))))) is really
hard to read...

FYI, the ActiveX help files for AutoCAD and ADT are really a great starting
point for application development.

Cheers,

Peter Funk
API Product Manager
Building Industry Division
Autodesk, Inc.
Message 7 of 10
Anonymous
in reply to: Anonymous

CJ....Forget the (Reverse (entget) of the dictionaries. It is horrible and
unreliable.
I know you are using JJ code, which works great, to parse but all his code
can be done in 2 LINES.

(setq AecVar (CS:GetAecVars)
AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
"AEC_VARS_DWG_SETUP")))
)

now use (assoc 9 (reverse AecVarsDwgSetup)).

3 lines of code and you got the variable you are looking for. I have this
setup in a function that does Getting/Setting variables.

Now I gave away my secret...ya happy.

--
-------------------------------------------------------------------------
Rob Starz

***Try DormerX, the easy to create dormer program for Arch. Desktop 3.x.***
http://www.stardsign.com/main.htm
Message 8 of 10
Anonymous
in reply to: Anonymous

Oh Rob you are so giving. You don't even charge enough for the apps you
make.

And the (CS:GetAecVars) would be something like this?

(vla-get-ADTSTUFF (vla-get-ActiveDocument (vlax-get-acad-object)))
help me out here, I know I'm close.

By the way does the CS: mean anything special. I've been setting up my
stuff as CJ: for my give away apps and for work SA: (suda architects). I
couldn't figuire if your's means anything. How about Cosmic Starz? or not.

Thanks guys, Hopefully I'll finish this routine and another like it (this
year) and then learn vba well enough to switch them over.

CJ

"Rob Starz" wrote in message
news:DF6496236B8955BC1073181F6FBBA81F@in.WebX.maYIadrTaRb...
> CJ....Forget the (Reverse (entget) of the dictionaries. It is horrible
and
> unreliable.
> I know you are using JJ code, which works great, to parse but all his code
> can be done in 2 LINES.
>
> (setq AecVar (CS:GetAecVars)
> AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
> "AEC_VARS_DWG_SETUP")))
> )
>
> now use (assoc 9 (reverse AecVarsDwgSetup)).
>
> 3 lines of code and you got the variable you are looking for. I have this
> setup in a function that does Getting/Setting variables.
>
> Now I gave away my secret...ya happy.
>
> --
> -------------------------------------------------------------------------
> Rob Starz
>
> ***Try DormerX, the easy to create dormer program for Arch. Desktop
3.x.***
> http://www.stardsign.com/main.htm
>
>
Message 9 of 10
Anonymous
in reply to: Anonymous

> Oh Rob you are so giving. You don't even charge enough for the apps you
> make.

Not so giving....the (CS:GetAecVars) cost $100 to get.


kidding....i forogt to modify my code.

(setq AecVar (vla-item (vlax-ename->vla-object (namedobjdict)) "AEC_VARS"))
AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
"AEC_VARS_DWG_SETUP")))
)

CS = Cad Solutions


--
-------------------------------------------------------------------------
Rob Starz

***Try DormerX, the easy to create dormer program for Arch. Desktop 3.x.***
http://www.stardsign.com/main.htm
"CJ Follmer" wrote in message
news:7EAF049B5F92A2FC61D3348687FACFD8@in.WebX.maYIadrTaRb...
>
> And the (CS:GetAecVars) would be something like this?
>
> (vla-get-ADTSTUFF (vla-get-ActiveDocument (vlax-get-acad-object)))
> help me out here, I know I'm close.
>
> By the way does the CS: mean anything special. I've been setting up my
> stuff as CJ: for my give away apps and for work SA: (suda architects). I
> couldn't figuire if your's means anything. How about Cosmic Starz? or
not.
>
> Thanks guys, Hopefully I'll finish this routine and another like it (this
> year) and then learn vba well enough to switch them over.
>
> CJ
>
> "Rob Starz" wrote in message
> news:DF6496236B8955BC1073181F6FBBA81F@in.WebX.maYIadrTaRb...
> > CJ....Forget the (Reverse (entget) of the dictionaries. It is horrible
> and
> > unreliable.
> > I know you are using JJ code, which works great, to parse but all his
code
> > can be done in 2 LINES.
> >
> > (setq AecVar (CS:GetAecVars)
> > AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
> > "AEC_VARS_DWG_SETUP")))
> > )
> >
> > now use (assoc 9 (reverse AecVarsDwgSetup)).
> >
> > 3 lines of code and you got the variable you are looking for. I have
this
> > setup in a function that does Getting/Setting variables.
> >
> > Now I gave away my secret...ya happy.
> >
> > --
>
> -------------------------------------------------------------------------
> > Rob Starz
> >
> > ***Try DormerX, the easy to create dormer program for Arch. Desktop
> 3.x.***
> > http://www.stardsign.com/main.htm
> >
> >
>
>
Message 10 of 10
Anonymous
in reply to: Anonymous

thanks Rob.


"Rob Starz" wrote in message
news:5B07DBF143D3A500A84BF78CEF5FB2AC@in.WebX.maYIadrTaRb...
> > Oh Rob you are so giving. You don't even charge enough for the apps you
> > make.
>
> Not so giving....the (CS:GetAecVars) cost $100 to get.
>
>
> kidding....i forogt to modify my code.
>
> (setq AecVar (vla-item (vlax-ename->vla-object (namedobjdict))
"AEC_VARS"))
> AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
> "AEC_VARS_DWG_SETUP")))
> )
>
> CS = Cad Solutions
>
>
> --
> -------------------------------------------------------------------------
> Rob Starz
>
> ***Try DormerX, the easy to create dormer program for Arch. Desktop
3.x.***
> http://www.stardsign.com/main.htm
> "CJ Follmer" wrote in message
> news:7EAF049B5F92A2FC61D3348687FACFD8@in.WebX.maYIadrTaRb...
> >
> > And the (CS:GetAecVars) would be something like this?
> >
> > (vla-get-ADTSTUFF (vla-get-ActiveDocument (vlax-get-acad-object)))
> > help me out here, I know I'm close.
> >
> > By the way does the CS: mean anything special. I've been setting up my
> > stuff as CJ: for my give away apps and for work SA: (suda architects).
I
> > couldn't figuire if your's means anything. How about Cosmic Starz? or
> not.
> >
> > Thanks guys, Hopefully I'll finish this routine and another like it
(this
> > year) and then learn vba well enough to switch them over.
> >
> > CJ
> >
> > "Rob Starz" wrote in message
> > news:DF6496236B8955BC1073181F6FBBA81F@in.WebX.maYIadrTaRb...
> > > CJ....Forget the (Reverse (entget) of the dictionaries. It is
horrible
> > and
> > > unreliable.
> > > I know you are using JJ code, which works great, to parse but all his
> code
> > > can be done in 2 LINES.
> > >
> > > (setq AecVar (CS:GetAecVars)
> > > AecVarsDwgSetup (entget (vlax-vla-object->ename(vla-item AecVar
> > > "AEC_VARS_DWG_SETUP")))
> > > )
> > >
> > > now use (assoc 9 (reverse AecVarsDwgSetup)).
> > >
> > > 3 lines of code and you got the variable you are looking for. I have
> this
> > > setup in a function that does Getting/Setting variables.
> > >
> > > Now I gave away my secret...ya happy.
> > >
> > > --
> >
>
> -------------------------------------------------------------------------
> > > Rob Starz
> > >
> > > ***Try DormerX, the easy to create dormer program for Arch. Desktop
> > 3.x.***
> > > http://www.stardsign.com/main.htm
> > >
> > >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost