Save Path iLogic Rules - error in xml document(1, 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning dear community. I wanted to tell you that as I have gone deeper into ilogic regarding the rules, I have learned that it is better to save the external ilogic rules because the internal ones remain within the file, if this rule in the future should be modified, improved or updated, one should track every file where it has been used, open it and update it.
So when I want to save my rules I import them like this video:
https://www.youtube.com/watch?v=dzLMKdzNCIU
I pass the rules to a text block and save it, however when I want to import it I get this error.
paso 1:
paso 2:
paso 3: - error
The code I use is the following:
'------start of iLogic exportar PDF a color-------
'Definición de rutas y nombres de archivo:
oPath = "C:\Users\INGENIA TECNICO\Desktop\06 PROYECTOS EN INVENTOR\DISEÑO - 230017 - LINDLEY ARCA IQUITOS\PLANOS" 'Especifica la ubicación de destino donde se guardarán los archivos PDF.
oFileName = ThisDoc.FileName(False) 'Obtiene el nombre del archivo actual sin la extensión.
'Obtención de datos del documento actual:
oRevNum = iProperties.Value("Project", "Revision Number") 'Obtiene el número de revisión del proyecto.
oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById _
("{0AC6FD95-2F4D-42CE-8BE0-8AEA580399E4}") 'Obtiene la extensión de Autodesk Inventor que permite exportar documentos en PDF.
oDocument = ThisApplication.ActiveDocument
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
If oPDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then
oOptions.Value("All_Color_AS_Black") = 0 'Monocromatico (1), Color (0)
oOptions.Value("Remove_Line_Weights") = 1 'Remover pesos de lineas Si(1) No (0)
oOptions.Value("Vector_Resolution") = 400 'Resolucion de las lineas
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets ' Exportar todas las paginas
'oOptions.Value("Custom_Begin_Sheet") = 2 'Inicio de pagina para exportar personalizado'
'oOptions.Value("Custom_End_Sheet") = 4 'Fin de pagina para exportar personalizado
End If
'obtiene la ruta objetivo del PDF
oFolder = Left(oPath, InStrRev(oPath, "\")) & "DOCUMENTOS EN PDF"
'Verifica el folder del PDF y lo crea si este no existe
If Not System.IO.Directory.Exists(oFolder) Then
System.IO.Directory.CreateDirectory(oFolder)
End If
'Aplica nombre de archivo al objetivo
oDataMedium.FileName = oFolder & "\" & oFileName &" REV. " & oRevNum & ".pdf"
'Publica el documento document
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'------Fin del iLogic-------
I really appreciate the help.