DaveWortley
10-29-2007, 09:37 AM
This code detached my selected faces on Friday, but today it won't even detach the selected faces. Couldn't get it to link the detached object to the object it was detached from, or a dummy. help please?
convertTo $ PolyMeshObject
--carpaint
the_polyobj = $
the_polyobj.selectbymaterial 13
the_faces = getfaceselection the_polyobj
the_name = execute(the_polyobj.name + "carpaint_" as string)
polyOp.detachFaces the_polyobj the_faces asnode:true name:the_name --detach
the_detached = execute( "$" + the_polyobj.name + "carpaint_" as string)
select the_detached
select $'Site_NSTruck-CPIKUP01_carpaint_'
the_dummy = "$Dummy_" + thepolyobj.name
$.parent = the_dummy
convertTo $ PolyMeshObject
--carpaint
the_polyobj = $
the_polyobj.selectbymaterial 13
the_faces = getfaceselection the_polyobj
the_name = execute(the_polyobj.name + "carpaint_" as string)
polyOp.detachFaces the_polyobj the_faces asnode:true name:the_name --detach
the_detached = execute( "$" + the_polyobj.name + "carpaint_" as string)
select the_detached
select $'Site_NSTruck-CPIKUP01_carpaint_'
the_dummy = "$Dummy_" + thepolyobj.name
$.parent = the_dummy
