@AngryBear (AngryBear) posted a new topic, subject "polyop select all verts or edge at 0,0,0 ??". It read:

   After searching all day i'm lost.
    
    I need to make a shape from and editpoly or mesh object that hits the ground.
    
    delete_all()  
    My_Building = box name:“Building” length:(random 20 40) width:(random 20 40) height:(random 40 70) isSelected:on  
    Building = convertToPoly My_Building  
    subobjectLevel = 2  
    Num_Edges = Building.GetNumEdges()  
    My_Edge = Building.EditablePoly.SetSelection #Edge #{1}
    
    Edge_Pos = polyop.getedge Building My_Edge
    
    So, getedge it not a () like getvert. Any thoughts on this?

Then @AngryBear (AngryBear) said

    Almost got it just get message it can't use my array Select_it
    
    Unable to convert: #(1, 2, 3, 4) to type: Integer
    [code] 
        actionMan.executeAction 0 "40021"
         delete $
         My_Building = box name:"Building" length:(random 20 40) width:(random 20 40) height:(random 40 70) isSelected:on
         convertToPoly My_Building
         Select_it = #()
         z = 1
         VertCount = polyop.getNumVerts My_Building
         for i = 1 to VertCount do(
         	My_Building.EditablePoly.SetSelection #Vertex #{i}
         	V_Sel = (getvertselection My_Building) as array
         	VertPos = polyop.getvert My_Building V_Sel[1]
         	if VertPos.z == 0.0 do(
         		Select_it[z] = i 
         		z = z + 1
         	)
         )
         print Select_it
         subobjectLevel = 1
         My_Building.EditablePoly.SetSelection #Vertex #{Select_it}
        
    [/code]
    
    so this added works but I need to find the correct fix  
    My_Building.EditablePoly.SetSelection #Vertex #{Select_it[1], Select_it[2], Select_it[3], Select_it[4]}

To which @AngryBear (AngryBear) replied

    Here is the full working code if you want to know how to select any edge at 0,0,0
    [code] 
        My_Building = selection[1]
        convertToPoly My_Building
        VertSet = #{}
        Select_it = #()
        z = 1
        VertCount = polyop.getNumVerts My_Building
        for i = 1 to VertCount do(
        	My_Building.EditablePoly.SetSelection #Vertex #{i}
        	V_Sel = (getvertselection My_Building) as array
        	VertPos = polyop.getvert My_Building V_Sel[1]
        	VertSet[i] = false
        	if VertPos.z == 0.0 do(
        		Select_it[z] = i
        		z = z + 1
        		VertSet[i] = true
        	)
        )
        subObjectLevel = 1
        polyop.setVertSelection My_Building VertSet
        -----------------------------------------------
        -- make verts to edge
        -----------------------------------------------
        vertsSel = getVertSelection My_Building
        edgeSel = polyop.getEdgesUsingVert My_Building vertsSel
        setEdgeSelection My_Building edgeSel
        max modify mode
        subObjectLevel = 2
        My_Building.EditablePoly.ShrinkSelection ()
        
    [/code]


{'source': 'discourse', 'url': 'https://forums.cgsociety.org/t/polyop-select-all-verts-or-edge-at-0-0-0/1647318', 'title': 'polyop select all verts or edge at 0,0,0 ??', 'views': 464, 'has_accepted_answer': False, 'word_count': 302, 'like_count': 0, 'reply_count': 1, 'participant_count': 1, 'posts': 3, 'tags': '', 'author': '@AngryBear (AngryBear)', 'participants': '@AngryBear (AngryBear)', 'image_url': '', 'created_at': '2014-08-26T09:03:11.000Z', 'last_posted_at': '2014-08-26T13:19:15.000Z'}