Xml Import Issues

Xml Import Issues

Anonymous
Not applicable
792 Views
2 Replies
Message 1 of 3

Xml Import Issues

Anonymous
Not applicable

Hi,

 

I'm currently working on importing an xml document into a drawing which in turn will drive what notes are visible.

 

It work's great when the xml document is in the correct location but as others look at the drawings it's coming up with an error message saying that it cannot find the xml. Is there any way to hide this message / stop it appearing if the xml document isn't available ?

 

 

Thanks in advance 🙂

 

 

 

 

 

0 Likes
Accepted solutions (1)
793 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Anyone got any idea's ??,

 

This is the code i have so far:

 

SyntaxEditor Code Snippet

iLogicVb.Automation.ParametersXmlLoad(ThisDoc.Document, ThisDoc.Path + "\" + Left(ThisDoc.FileName(False),4) + "-5.5-02_" + "DATA-SHEET" + "_PARAMETERS" + ".xml")

 

Just need something that says if file unavalible no error message ?

 

 

Thanks  

0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution

Cracked it 🙂

 

 

 

SyntaxEditor Code Snippet

If System.IO.File.Exists(ThisDoc.Path + "\" + Left(ThisDoc.FileName(False),4) + "-5.5-02_" + "DATA-SHEET" + "_PARAMETERS" + ".xml") Then
 iLogicVb.Automation.ParametersXmlLoad(ThisDoc.Document, ThisDoc.Path + "\" + Left(ThisDoc.FileName(False),4) + "-5.5-02_" + "DATA-SHEET" + "_PARAMETERS" + ".xml")
 Else 
End If

 

 

 

 

0 Likes