Message 1 of 5
Not applicable
10-03-2014
01:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
We've been using this rule quite a while. All of a sudden i get this error (attachment). The strange things are that;
- nothing has changed to the code,
- and only on my computer i get the error, my colleagues can run the same code on their computer without any problems (same Windows and Inventor version).
aPath = ThisDoc.Path
iPropParNum = iProperties.Value("Project", "Part Number")
iPropRevNum = iProperties.Value("Project", "Revision Number")
aFolder = aPath & "\" & "DWG"
aDWG = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")
aDoc = ThisApplication.ActiveDocument
transObjs = ThisApplication.TransientObjects
aContext = transObjs.CreateTranslationContext
aContext.Type = kFileBrowseIOMechanism
aOptions = transObjs.CreateNameValueMap
If aDWG.HasSaveCopyAsOptions(aDoc, aContext, aOptions) Then
End If
Dim aDataMedium As DataMedium
aDataMedium = ThisApplication.TransientObjects.CreateDataMedium
aDataMedium.FileName = aFolder & "\" & iPropParNum & " rev" & iPropRevNum & " - 2D drawing" & ".dwg"
aName = aDataMedium.FileName
aDWG.SaveCopyAs(doc, context, options, oDataMedium)
If System.IO.File.Exists( aFolder & "\" & " rev" & " - 2D drawing" & ".dwg" ) = True Then
System.IO.File.Delete( aFolder & "\" & " rev" & " - 2D drawing" & ".dwg" )
End If
If System.IO.File.Exists( aFolder & "\" & iPropParNum & " rev" & " - 2D drawing" & ".dwg" ) = True Then
System.IO.File.Move( aFolder & "\" & iPropParNum & " rev" & " - 2D drawing" & ".dwg", aFolder & "\" & iPropParNum & " - 2D drawing" & ".dwg" )
End If
Does anybody know how this can be solved? Any help is welcome!
Thanks,
Stan
Solved! Go to Solution.