Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. MichalPon

    CATIA CATScript: How Can I determine path to the folder where a script is running ?

    Fernando, It works well but my case is little more complicated. Let me explain. Generally there are 3 files: AAA.CATScript, BBB.CATVBA, CCC.xlsx User start from AAA.CATScript connected with CATVBA. I need to identify path where AAA.CATScript was run to paste it into "strFilePath" for CATVBA...
  2. MichalPon

    CATIA CATScript: How Can I determine path to the folder where a script is running ?

    Hello, I received following error when I try to use this code in line: Set WScript = CreateObject("WSH.WScript") ScriptingERR_1002 Description: ActiveX component can't create object: 'WSH.WScript'
  3. MichalPon

    CATIA CATScript: How Can I determine path to the folder where a script is running ?

    How can I load "Microsoft Scripting Runtime" library for CATScript ? It's not VBA when I have option to add library in references.
  4. MichalPon

    CATIA CATScript: How Can I determine path to the folder where a script is running ?

    Hello, I want to create a macro with will be location independent. Right now I have issue with getting string containing location where macro starts. Using code listed below I get an error msg: Object required 'WScript' Sub CATMain() Set objShell = CreateObject("Wscript.Shell") strPath =...
  5. MichalPon

    CATIA VBA : Get instance name path from selected item to root product

    Problem solved. Correct VBA code: Sub CATMain() Dim Sel1 As Object Dim Filter1(0) Dim Status1 As String Dim objPrd As Object Dim fullpath As String Dim reachroot As Variant Dim checkParent As String ' [ Part Selection ] *** Set Sel1 =...
  6. MichalPon

    CATIA VBA : Get instance name path from selected item to root product

    On this line in While loop: Set objPrd = objPrd.Parent Error msg: Run-time error '13': Type mismatch
  7. MichalPon

    CATIA VBA : Get instance name path from selected item to root product

    Thanks for developing code but there is still something wrong. When I try to use it as CATScript I get infinite loop. In other case when I try to use as VBA I was asked to add a few dims but even after that step I not received MsgBox, macro just stops/crash without it. Dims that I added: Dim...
  8. MichalPon

    CATIA VBA : Get instance name path from selected item to root product

    I try this configuration and it's not gives proper results.
  9. MichalPon

    CATIA VBA : Get instance name path from selected item to root product

    Hello, I have issue with getting instance name path of selected item to root product. Result that I want to get from CATIA in this case is string with the following path: "Product2.1\Part2.1" Additional thing is that CATIA tree will be not known in the future. Getting path formula should work...

Part and Inventory Search

Back
Top