Click here to Skip to main content
14,668,640 members
Rate this:
Please Sign up or sign in to vote.
See more:
public void SaveAs()
		{
			UpdateData();
			SaveFileDialog dlg = new SaveFileDialog();
			dlg.Filter = "Cad XML files (*.cadxml)|*.cadxml";
			dlg.OverwritePrompt = true;
			if (m_filename.Length > 0)
				dlg.FileName = m_filename;
			if (dlg.ShowDialog(this) == DialogResult.OK)
			{
				m_filename = dlg.FileName;
				m_data.Save(m_filename);
				Text = m_filename;
			}
		}


What I have tried:

public void SaveAs()
		{
			UpdateData();
			SaveFileDialog dlg = new SaveFileDialog();
			dlg.Filter = "Cad XML files (*.txt)|*.cadxml";
			dlg.OverwritePrompt = true;
			if (m_filename.Length > 0)
				dlg.FileName = m_filename;
			if (dlg.ShowDialog(this) == DialogResult.OK)
			{
				m_filename = dlg.FileName;
				m_data.Save(m_filename);
				Text = m_filename;
			}
		}
Posted
Updated 26-Sep-20 4:33am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

You cannot load one file and then simply use save to save it as a different type. You need to convert the CAD file into an image with some code. Either an existing library which you can search for with Google. Or writing the code yourself based on the information about the structure of a cadxml file. Although the extension suggests that it is XML (i.e. text) rather than an image.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100