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...
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'
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 =...
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 =...
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...
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...