Importing very large IGES files

Discussion in 'SolidWorks' started by The Pixleys, Apr 6, 2005.

  1. The Pixleys

    The Pixleys Guest

    Does anyone know a way to import Pro-E assys (1000+ parts) as iges files
    into SW without SW automatically suppressing all the parts. It takes for
    ever to go through all the sub assys and unsuppress everything.

    Thanks all,

    Jim Pixley
    Designer - DSG
    Gloucester, Ma
     
    The Pixleys, Apr 6, 2005
    #1
  2. The Pixleys

    MM Guest

    Jim,

    I'd be thankfull you can even read them at this point.

    There may be something you can do with the API, maybe Baren-Boym has an add
    in


    Regards

    Mark
     
    MM, Apr 6, 2005
    #2
  3. The Pixleys

    CS Guest

    We use assemblys between 1000 and 2000 parts with little problems here
    is a macro that will recurse the assembly tree and unsupress all parts,
    let me know how it works I didn't do too much testing.

    Dim swApp As SldWorks.SldWorks
    Dim Assy As SldWorks.ModelDoc2
    Dim Config As SldWorks.Configuration

    Sub main()
    Dim rootComp As Component2

    Set swApp = Application.SldWorks
    Set Assy = swApp.ActiveDoc
    Set FeatMan = Assy.FeatureManager
    Set Config = Assy.GetActiveConfiguration
    Set rootComp = Config.GetRootComponent

    RecurseAssy rootComp, 0

    End Sub


    Sub RecurseAssy _
    ( _
    swComp As SldWorks.Component2, _
    nLevel As Long _
    )

    Dim vChildComp As Variant

    Dim swChildComp As SldWorks.Component2

    Dim swCompConfig As SldWorks.Configuration

    Dim sPadStr As String

    Dim i As Long

    Dim SplitStr As Variant

    Dim NewComp As Boolean


    For i = 0 To nLevel - 1

    sPadStr = sPadStr + " "

    Next i



    vChildComp = swComp.GetChildren

    For i = 0 To UBound(vChildComp)

    Set swChildComp = vChildComp(i)
    Debug.Print swChildComp.Name2
    superr = swChildComp.SetSuppression2(swComponentResolved)
    Select Case superr
    Case swSuppressionError_e.swSuppressionBadComponent
    Debug.Print "swSuppressionBadComponent"
    Case swSuppressionError_e.swSuppressionBadState
    Debug.Print "swSuppressionBadState"
    Case swSuppressionError_e.swSuppressionChangeFailed
    Debug.Print "swSuppressionChangeFailed"
    Case swSuppressionError_e.swSuppressionChangeOk
    'Debug.Print "swSuppressionChangeOk"
    End Select

    RecurseAssy swChildComp, nLevel + 1

    Next i

    End Sub

    paste this into a new macro and hit play on the main sub
     
    CS, Apr 6, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.