+ Reply to Thread
Results 1 to 8 of 8

Thread: plane script

  1. #1
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Apr 2007
    Location
    Michigan
    Posts
    4

    Default plane script

    Registered forum members do not see this ad.

    I have a cube made up of 27 blocks, 3x3x3. I need to write a script or lsp which will select all the blocks on the middle layer. They all have the same base point X value. Nothing else but this cube is in the drawing.
    How would do this?
    -thanks

  2. #2
    Forum Deity
    Using
    not specified
    Join Date
    Jul 2004
    Location
    Anchorage, Alaska
    Posts
    2,074

    Default

    What kind of objects are these blocks-3dsolids?

  3. #3
    Super Member CAB's Avatar
    Using
    AutoCAD 2000
    Join Date
    May 2004
    Location
    Tampa, Florida
    Posts
    801

    Default

    Look at the ssget function.

    I assume the layer name is "middle".

    Code:
    (setq ss (ssget "_X" '((8 . "middle"))))

  4. #4
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Apr 2007
    Location
    Michigan
    Posts
    4

    Default

    The objects are blocks. After the middle layer is selected I will be rotateing it. The selecting all the "blocks" with the same user selected Y value and rotating them. The "ceter layer blocks" have a X base point value of 14. From what Ive found I think i'm looking for something along the lines of selecting everthinging and then filtering out with
    (ssget "x" ' ((0. "INSERT") (10. 14)))
    -Smik

  5. #5
    Forum Deity
    Using
    not specified
    Join Date
    Jul 2004
    Location
    Anchorage, Alaska
    Posts
    2,074

    Default

    Looks like you're trying to animate a rubic's cube

    Yes your syntax is pretty close, but need a space afer some codes.
    You can use:

    (setq MidSet (ssget "x" '((0 . "INSERT")(10 . 14.0))))

    to select those blocks, then in a rotate command use "MidSet" for the selection set.

  6. #6
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Apr 2007
    Location
    Michigan
    Posts
    4

    Default

    Thanks CarlB. I'll give it a try. Correct about the ruiks cube. My brothers son wants to be able to do it on the computer. I came up with
    (setq s4 (ssget "_X" '((10 14.0 25.0 30.0)))) to select one block but couldnt get wildcards for the Y Z
    -Smik

  7. #7
    Forum Deity
    Using
    not specified
    Join Date
    Jul 2004
    Location
    Anchorage, Alaska
    Posts
    2,074

    Default

    I think you've got it right with your filter, and yes the "group 10" data does need to include at least x & y values for the coordinate.

    I'm not aware of a selection filter on a part of the insert coordinates. You may need to select every block, step through each, examine the coodinates, and create a new selection set of those that match desired x value.

  8. #8
    Forum Newbie
    Using
    AutoCAD 2005
    Join Date
    Apr 2007
    Location
    Michigan
    Posts
    4

    Default a couple loops

    Registered forum members do not see this ad.

    your help has saved me alot of time. I was just hoping for a 1 line of code that would be like the quick select> block ref > Position x,y or z. I guess I might have to figure out how to put in a couple loops. thanks again.

    -Smik

Similar Threads

  1. 3d model to 2d plane?
    By CADIDAC in forum AutoCAD 3D Modelling & Rendering
    Replies: 9
    Last Post: 25th Mar 2007, 10:17 am
  2. Any-plane Arc!
    By fahim108 in forum Tutorials & Tips'n'Tricks
    Replies: 3
    Last Post: 2nd Aug 2006, 07:24 pm
  3. Is their another way to rotate a 3d plane...
    By Mc... in forum AutoCAD Drawing Management & Output
    Replies: 8
    Last Post: 1st May 2006, 06:41 am
  4. rolling a plane onto a cylinder
    By jlm in forum AutoCAD General
    Replies: 1
    Last Post: 17th Feb 2006, 06:13 pm
  5. Cutting plane ???
    By Zane sinner in forum AutoCAD General
    Replies: 5
    Last Post: 17th Feb 2006, 12:26 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts