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

getvar viewctr

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
375 Views, 2 Replies

getvar viewctr

I am trying to use viewctr as the "location" point in a circle query with a
radius of 7000. I can type (getvar "viewctr") and it will work in the
dialog boxes, but it will not appear in the external query. How can I get
(getvar "viewctr") to work in an external query? Thank you.
Tim
2 REPLIES 2
Message 2 of 3
gerardog
in reply to: Anonymous

Hi! 🙂
Try to use something like the following:
(ade_qrydefine (list "" "" "" "Location"
(list "circle" "crossing"
(getvar "viewctr")
(getvar "viewsize")
)
"")
)

This will create a location condition with a circle whose center is the current view center, and the radius is the height of the view.
Regards,
gg.
Message 3 of 3
Anonymous
in reply to: Anonymous

Thank you.

Using the "list" is what I was missing for using
variables.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi!
🙂
Try to use something like the following:
(ade_qrydefine (list "" ""
"" "Location"
   (list "circle" "crossing"

       (getvar "viewctr")

       (getvar "viewsize")

   )
   "")
)

This will create a location condition with a circle whose center is the
current view center, and the radius is the height of the view.
Regards,

gg.

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

Post to forums  

Autodesk Design & Make Report

”Boost