I just created an adaptible surface in a part using copy object however the surface has 2 names Srf3 and Surface2. For whatever reason the program does not recognize "Surface2." as the name. If I create a new surface using copy object I'm lost as to the new name and which is correct to use when calling the split command. Can anyone help?
Option Explicit Dim oPartDoc As PartDocument Dim oCompDef As PartComponentDefinition Dim oSplit As SplitFeature Public Sub SplitAllFaces() On Error GoTo err_SplitAllSurfaces Set oPartDoc = ThisApplication.ActiveDocument Set oCompDef = oPartDoc.ComponentDefinition Dim oWorkSurfaces As WorkSurfaces Dim oWorkSurf As WorkSurface Dim oWorkplane As WorkPlane Dim oSurfBodies As SurfaceBodies Dim oSurfBody As SurfaceBody Dim oSurfBodyDef As SurfaceBodyDefinition Set oWorkSurfaces = oPartDoc.ComponentDefinition.WorkSurfaces Set oWorkSurf = oWorkSurfaces.Item("Surface2") Set oSurfBodies = oCompDef.SurfaceBodies ' MsgBox "Please wait while the Splits are being performed....." For Each oSurfBody In oSurfBodies 'Take the remaining workplanes and slice and dice Set oSplit = oCompDef.Features.SplitFeatures.SplitFaces(oWorkSurf, _ True, oSurfBody) Next oSurfBody
Sorry, not allowed.
To give a background I'm trying to take an assy w/ a crane path and carve out the interference of an item along the assy. So I'm taking, for example, a car and adding the crane crossection pathway with copy object to the car part. Then I need to split all the solids that make up the body using the surface representing the outer edges of the crane traveling down the assembly line. I can then highlight the new solids red and take measurements.
However I'm trying to have the copy object command function automatically such that I need only press a button and I have a new car assy complete w/ the interference cutouts. If I don't have a way of identifying the surface that was created using copy object I have to update the code manually for each subAssy part.
So for a simple example I have the Body, Chassis, and Interior each as a multibodied part. I need to copy the crane path surface to each part. Then perform splits for each solid of each multibodied part.
The problem being I don't know what the surface name is when I copy it into each part.
Thank you for your kindly and clear explanation, I think is better to talk with a computer programmer for solve your issues.
What I miss is the time.
Then, first of all I'm sorry to waste your time, I believe you will find a qualified person with more time.
Bregs
Rossano Praderi