Hi sergelachance,
Because you can have multiple workgroups defined in your project file, you need to hand them to an array. Here's an example that reports all of the workgroups:
Dim asNames() As String = {}
Dim asPaths() As String = {}
Dim iNumWorkgroups As Long
ThisApplication.FileLocations.Workgroups(iNumWorkgroups, asNames, asPaths)
i = 0
Do until i = iNumWorkgroups
wGName = asNames(i)
wGPath = asPaths(i)
MessageBox.Show("WorkGroup Name: " & wGName _
& vblf & "WorkGroup Path: " & wGPath , "iLogic")
i = i + 1
Loop
If you know that you only have one workgroup, I suppose you could use something like this:
Dim asNames() As String = {}
Dim asPaths() As String = {}
Dim iNumWorkgroups As Long
ThisApplication.FileLocations.Workgroups(iNumWorkgroups, asNames, asPaths)
MessageBox.Show("WorkGroup Name: " & asNames(0) _
& vblf & "WorkGroup Path: " & asPaths(0) , "iLogic")
And just in case someone is looking for how to find the workspace path directly , here it is as well:
MyWorkSpace = ThisApplication.FileLocations.Workspace
MessageBox.Show("WorkSpace Path: " & MyWorkSpace, "iLogic")
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com