|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
I could stop if I wanted to
Join Date: 2003-09
Posts: 298
![]() |
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 |
|
|
|
|
|
#2 |
|
Member
Join Date: 2001-12
Location: North Carolina, USA
Posts: 27
![]() ![]() |
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. |
|
|
|
|
|
#3 |
|
Vice President / Director
Join Date: 2000-09
Location: Kenosha Wisconsin
Posts: 375
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
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)))
)
)
(ssgetUCS "fred") Hope it helps Peter Jamtgaard |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
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 |