Results 1 to 2 of 2

Thread: VBA; convert PolyLine to Slab; help needed

  1. #1
    Login to Give a bone
    0

    Default VBA; convert PolyLine to Slab; help needed

    Hi all!

    i started using VBA for programming ADT 2006, specifically with AEC objects.

    i want to convert some PolyLines to Slabs and Walls, i do this by that code:

    ThisDrawing.SendCommand "_AecSlabConvert" & vbCr & "0,0,0" & vbCr & "b" & vbCr & "t" & vbCr

    It works, but i select a PolyLine by a Point, like "0,0,0" and when something else lies on this Point, i have no control about the selection!

    So my question is:

    How can i else convert Lines to Walls or Slabs?
    or
    How can i select elements through VBA in ADT, and how works this SelectionSets like this:

    ThisDrawing.ActiveSelectionSet



    Thanks for your help,

    Chris

  2. #2
    Member
    Join Date
    2007-10
    Posts
    2
    Login to Give a bone
    0

    Default Re: VBA; convert PolyLine to Slab; help needed

    Hi Chris

    Hope this helps

    Code:
    Sub Example_SelectAtPoint()
        ' This example adds objects to a selection set by identifying a point.
        ' At first all objects at the point are added to the selection set. Then
        ' only circle objects at the point are added to the selection set.
        
        ' Create the selection set
        Dim ssetObj As AcadSelectionSet
        Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET1")
       
        ' Add to the selection set all the objects that lie at point(6.8,9.4,0) 
        Dim point(0 To 2) As Double
        point(0) = 6.8: point(1) = 9.4: point(2) = 0
        ssetObj.SelectAtPoint point
        
        ' Add to the selection set all the Circles that lie at point (6.8,9.4,0) 
        Dim gpCode(0) As Integer
        Dim dataValue(0) As Variant
        gpCode(0) = 0
        dataValue(0) = "Circle"
        
        Dim groupCode As Variant, dataCode As Variant
        groupCode = gpCode
        dataCode = dataValue
        
        ssetObj.SelectAtPoint point, groupCode, dataCode
        
    End Sub
    You can change "Circle" to any object you are trying to select


    Brent
    Last edited by Opie; 2007-10-09 at 01:41 PM. Reason: [CODE] tags added

Similar Threads

  1. Convert to Polyline
    By BILLYJOW in forum AutoLISP
    Replies: 2
    Last Post: 2012-12-26, 03:33 PM
  2. Convert polyline to Arc
    By whittendesigns in forum AutoCAD General
    Replies: 7
    Last Post: 2008-02-25, 12:13 PM
  3. Convert a Polyline to a 3D polyline?
    By Mr Cory in forum AutoLISP
    Replies: 2
    Last Post: 2007-07-11, 08:22 PM
  4. 3D POLYLINE TOOLBAR NEEDED FOR CIVIL 3D
    By mms in forum Civil 3D Wish List
    Replies: 4
    Last Post: 2005-10-31, 03:20 PM
  5. Replies: 9
    Last Post: 2005-06-29, 09:49 PM

Posting Permissions

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