Free-Solidworks-OBJ-Exporter icon indicating copy to clipboard operation
Free-Solidworks-OBJ-Exporter copied to clipboard

runtime error 91

Open Mannshoch opened this issue 5 years ago • 11 comments

Got a runtime error 91

Private Function getFaceMaterial(sldFace As Object) As String



    getFaceMaterial = convArrayToStr(sldFace.MaterialPropertyValues)



    Dim getFaceTexture As SldWorks.texture 'look for textures on faces

    Dim configName As String

    Dim strTexPath As String, strTex As String, strScFact As String, saveTexPath As String

    Dim bfaceName As String, savebFaceName As String

    Dim featureName As String, saveFeatureName As String

    

    Set getFaceTexture = sldFace.GetTexture(configName)

    If Not getFaceTexture Is Nothing Then

        strTexPath = getFaceTexture.MaterialName

        saveTexPath = collectTexPaths(strTexPath)

        strTex = getTextureName(strTexPath)
 ➡       strScFact = getFaceTexture.ScaleFactor
        'Print #3, strTex, "fc"

    Else

        strTex = ""

        strScFact = ""

    End If

    

    If Not getFaceMaterial = "" Then 'face's body name for reference name

        bfaceName = sldFace.GetBody.Name & " face" '& " fcn"

        savebFaceName = collectReferNa

Mannshoch avatar Aug 27 '20 12:08 Mannshoch

@Mannshoch , thank you for adding this issue. So far, I haven't been able re-produce the problem. Can you let me know what version of Solidworks you are using and the settings that you selected when you hit the "RUN EXPORTER" button? Also, confirm that you are using the .swp file from the version 2.1 release. Thanks!

Aeroanion avatar Aug 31 '20 18:08 Aeroanion

I'm not able to download 2.1. If I download it here and start it in Solidworks 2020 SP4 the Makro show me 2.0 grafik

Mannshoch avatar Sep 01 '20 15:09 Mannshoch

Thanks for the reply. The "v2.0" label at the top is a mistake. It should be "v2.1", so it looks like you do have v2.1. I still have not been able to reproduce the issue. It might have something to do with the particular model you are trying to export. Without the model, I am not sure that I will be able to duplicate the issue, but I will keep this in mind and update here if I do find anything.

Aeroanion avatar Sep 15 '20 18:09 Aeroanion

If I could help you somehow I will do it. Do you see a possibility to use it e.g. with Solidworks Taskscheduler so I may could create an OBJ from every part and assembly? so I'm may find out where in this assembly this error appears first time. Than I may could send you this specific part or subassembly.

Mannshoch avatar Sep 19 '20 13:09 Mannshoch

@Mannshoch , when you get a chance, download the macro from the issue16 branch that I made today. I turned on the debugging log file. Run the macro on the assembly that gave you the error (I think the macro in this branch will only work on assemblies without errors, not parts). It will create a log file in the assembly's directory, where it makes the OBJ directory. See what the log file says, if should be a list of the parts in the assembly. If so, I think the last part listed is the one with the issue.

Aeroanion avatar Sep 24 '20 17:09 Aeroanion

I tested this script on the last assembly in this log. 2020 - Esstisch-Wohnen It seems It's not the cause assembly of this error.

Mannshoch avatar Sep 29 '20 07:09 Mannshoch

Thanks for trying that. This is still a mystery to me. How many assemblies or parts are in the main assembly? I'm wondering if its getting to the end of the memory for a container, or something like that.

Aeroanion avatar Oct 02 '20 18:10 Aeroanion

grafik

I have 32GB Ram if I run your Makro I don't see any huge change in the RAM usage. The only thing I recognize that your makro do not give any Progressbar or such kind of feedback. Solidworks is simply blocked and could not accessed until the script finish (#18 ).

Mannshoch avatar Oct 06 '20 07:10 Mannshoch

Having the same error here

KySpace avatar Nov 09 '23 05:11 KySpace