Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sam Jones

XML file creation error codes

Recommended Posts

I am trying to write an XML file with the procedure 


result := WriteXMLFile(hXML, -1, XMLFilePathName); 


Unfortunately, the result is equaling -1028

result = -1028


1. What does -1028 mean?

2. Is there s list of the error codes generated by file creation and specifically XML file creation



Share this post

Link to post

I don't have a list of error codes, but after a few minutes of playing I think it is the -1 path that is the problem.


It appears based on comments on the developer wiki reference list that you can't access the 1 and 12 (Applications folder and User App Data) folders. When I try I get the -1028 error.


Try -15 for now. This is the Settings folder in the User Library:Application Support:Vectorworks:2019:Settings.


It appears to create the file with no problem there.

Share this post

Link to post

Actually -2 works just fine.  The problem was a "/" instead of a "\" in the XML element description.  I later ran into a problem with a space in the XML element name.  However, you should know that accessing the User Folder's Plug-ins folder is easily done with the GetFolderPath(-2).  I do it all the time.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.