get the block @ a point with a given name
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
get the block @ a point with a given name

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
hutch
Guest





Posted: Sun Apr 03, 2005 1:10 am    Post subject: get the block @ a point with a given name Reply with quote

This works:
(ssget "x" '((0 . "INSERT")(2 . "MyBlock")))

But this does not:
(ssget "x" '((0 . "INSERT")(2 . "MyBlock")(cons 10 pnt)))

Why? Can't I include the point in the filter?
pnt is a list like this --> (x y z)

Back to top
Jeff Mishler
Guest





Posted: Sun Apr 03, 2005 1:19 am    Post subject: Re: get the block @ a point with a given name Reply with quote

You can't use cons in a quoted list. Try this:
(ssget "x" (list '(0 . "INSERT") '(2 . "MyBlock") (cons 10 pnt)))

--
Jeff
check out www.cadvault.com
"hutch" <nospam@address.withheld> wrote in message
news:3676682.1112472633128.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
This works:
(ssget "x" '((0 . "INSERT")(2 . "MyBlock")))

But this does not:
(ssget "x" '((0 . "INSERT")(2 . "MyBlock")(cons 10 pnt)))

Why? Can't I include the point in the filter?
pnt is a list like this --> (x y z)
Back to top
Jürg Menzi
Guest





Posted: Sun Apr 03, 2005 1:21 pm    Post subject: Re: get the block @ a point with a given name Reply with quote

Hi Hutch

In general see Jeff's answer. Because of inaccuracy of decimal numbers I would
suggest use a fuzzy point filter method:
Code:

(setq PreVal 1E-8
      LolPnt (mapcar '- Pnt (list PreVal PreVal PreVal))
      UprPnt (mapcar '+ Pnt (list PreVal PreVal PreVal))
)
(ssget "X" (list
           '(0 . "INSERT")
           '(2 . "MyBlock")
           '(-4 . ">,>,>") (cons 10 LolPnt)
           '(-4 . "<,<,<") (cons 10 UprPnt)
           )
)


Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB