Not applicable
07-01-2019
06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Best
I cannot find a solution how I can take the dwg drawings with me. These are in the workspace but in a different folder.
I have to change this rule. But I don't find the information. I tried
the full code
oPacknGo.AddFilesToPackage(path,sRefFiles)
path stands for the location of the folder. But this gives an error ![]()
Do you know of a possible solution or where I can find more information about how it works?
Dim oPacknGoComp As New PackAndGoLib.PackAndGoComponent
Dim pAth1 As String
Dim pAth2 As String
Dim pAth3 As String
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\Users\epls\Desktop\PATH.txt")
Dim paths As String() = fileReader.Split(New String() {System.Environment.NewLine},
StringSplitOptions.None)
'Dim paths As String() = fileReader.Split(vbLf)
pAth1 = paths(0)
pAth2 = paths(1)
pAth3 = paths(2)
Dim oPacknGo As PackAndGoLib.PackAndGo
If (Not System.IO.Directory.Exists(pAth2)) Then
System.IO.Directory.CreateDirectory(pAth2)
End If
oPacknGo = oPacknGoComp.CreatePackAndGo(pAth1, pAth2)
' set the correct project file. otherwise, the method will crash
oPacknGo.ProjectFile = pAth3
Dim sRefFiles = New String() {}
Dim sMissFiles = New Object
' Set the options
oPacknGo.SkipLibraries = True
oPacknGo.SkipStyles = True
oPacknGo.SkipTemplates = True
oPacknGo.CollectWorkgroups = False
oPacknGo.KeepFolderHierarchy = True
oPacknGo.IncludeLinkedFiles = True
' Get the referenced files
oPacknGo.SearchForReferencedFiles(sRefFiles, sMissFiles)
' Add the referenced files for package
oPacknGo.AddFilesToPackage(sRefFiles)
' Start the pack and go to create the package
oPacknGo.CreatePackage()thank you in advance
Solved! Go to Solution.
