Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-07-02, 10:43 PM   #1
vferrara
I could stop if I wanted to
 
Join Date: 2003-09
Posts: 298
vferrara appears to be going the right way
Default Isolate Objects by USC

Hello to All AUGI Members:

I have a question that might be a first for AutoCAD users.

We are using AutoCAD Architectural Desktop 2005 and I would like to know if objects such as blocks, lines, text, circles etc, placed on the drawing while in various UCS's can be identified either by isolating or filtering of some kind.

It would be great if blocks inserted while in UCS system "A" can be identified or isolated from blocks that were inserted while in UCS system "B" or even blocks that were inserted in the "World" UCS system.

Does anyone know if this can be done...??

Any help with this matter would be appreciated.

Regards,
Vince
vferrara is offline   Reply With Quote
Old 2004-07-03, 04:23 PM   #2
dbroad
Member
 
Join Date: 2001-12
Location: North Carolina, USA
Posts: 27
dbroad is going the right waydbroad is going the right way
Default RE: Isolate Objects by USC

AFAIK objects do not retain their parent UCS. Blocks have insertion
points x, y, and z. In general, data is translated to ECS (which is
normally WCS).

To search for rotated objects, filter on rotation, where applicable.
To search for objects at a different elevation, filter on their
insertion points or endpoints and look for elevation

For elevation z = 2.0
(setq ss (ssget "x" '((-4 . "*,*,=")(10 0.0 0.0 2.0))))

You can also filter on the extrusion vector.
dbroad is offline   Reply With Quote
Old 2004-07-04, 05:43 PM   #3
peter
Vice President / Director
 
peter's Avatar
 
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
peter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the starspeter is shooting for the stars
Default RE: Isolate Objects by USC

OK if you would like to isolate objects by named UCS coordinate systems within a drawing I cooked this application.

Code:
(defun ssgetUCS (strUCSName / lstOrigin lstXVector lstYVector lstNormal objUCS)
 (setq objUCS (vla-item (vla-get-usercoordinatesystems
                         (vla-get-activedocument
                          (vlax-get-acad-object)
                         )
                        )
                        strUCSName
              )
 ) 
 (setq lstOrigin  (vlax-safearray->list (variant-value (vla-get-origin  objUCS)))
       lstXVector (vlax-safearray->list (variant-value (vla-get-XVector objUCS)))
       lstYVector (vlax-safearray->list (variant-value (vla-get-YVector objUCS)))
       lstNormal  (normal lstXVector lstYVector)
 )
 (if lstNormal
  (ssget "x" (list (cons 210 lstNormal)))
 )
)
(defun Normal (lst1 lst2)
 (list 
  (- (* (cadr lst1) (caddr lst2))(* (caddr lst1)(cadr lst2)))
  (- (* (caddr lst1)(car  lst2)) (* (car lst1)  (caddr lst2)))
  (- (* (car lst1)  (cadr lst2)) (* (cadr  lst1)(car  lst2)))
 )
)
So if you had a named use called "fred" you could select objects on the ucs system with the following expression

(ssgetUCS "fred")

Hope it helps


Peter Jamtgaard
peter is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permanently hiding selected objects (not objects-by-category) cjneedham Revit Architecture "Original" Wish List (Archived) 2 2004-06-28 02:18 PM
Unable to select OLE Objects jrd.chapman AutoCAD General 5 2004-06-23 02:41 PM
Multi-plane sweeps without helper objects Wes Macaulay Revit Architecture "Original" Wish List (Archived) 1 2004-06-04 06:20 PM
Need a feature to turn off relationship between objects Richard McCarthy Revit Architecture - General 0 2004-03-20 06:03 AM
Selecting all similar objects SCShell Revit Architecture - General 4 2004-01-12 04:04 PM


All times are GMT +1. The time now is 02:14 PM.