TheSwamp

Code Red => .NET => Topic started by: Coder on February 17, 2016, 01:46:50 AM

Title: Error with SaveFileDialog
Post by: Coder on February 17, 2016, 01:46:50 AM
Hello guys.

It seems that I can't make an instance of SaveFileDialog ! and it requires to feed it with the arguments as in the attached image.

Is there any work around this error?

Thanks a lot.




edit:kdub->fixed post title
Title: Re: Error with SvaeFileDialog
Post by: kdub_nz on February 17, 2016, 02:03:41 AM
The SaveFileDialog constructor does not take parameters.

New the SaveFileDialog () then set properties.

https://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog(v=vs.110).aspx
Title: Re: Error with SvaeFileDialog
Post by: Coder on February 17, 2016, 02:09:54 AM
Yes,
I wonder why it gives me that error message this time !
Title: Re: Error with SaveFileDialog
Post by: kdub_nz on February 17, 2016, 02:13:30 AM
Silly me , I assumed you meant the System.Windows.Forms.SaveFileDialog()

Did you mean Autodesk.AutoCAD.Windows.SaveFileDialog

I should have guessed that.

//----------------------------

Provide more detail about what doesn't work for you .


edit:fixed post title
Title: Re: Error with SaveFileDialog
Post by: kdub_nz on February 17, 2016, 02:25:01 AM
See if these help
http://through-the-interface.typepad.com/through_the_interface/2009/08/allowing-a-user-to-select-from-multiple-file-formats-inside-autocad-using-net.html

http://through-the-interface.typepad.com/through_the_interface/2007/08/using-autocads-.html

http://through-the-interface.typepad.com/through_the_interface/2007/03/replacing_the_o.html



Title: Re: Error with SaveFileDialog
Post by: Coder on February 17, 2016, 02:36:30 AM
Silly me , I assumed you meant the System.Windows.Forms.SaveFileDialog()
Not silly at all but that is the truth  :wink:
I confused between the two SvaeFileDialog methods, Windows and AutoCAD. sorry for that.

I added the full path of the NameSpace System.Windows.Forms.SaveFileDialog svd ..... and that 's what I was after.

Many thanks Kerry for your prompt help.

And thanks for the links , they look great and very informative.
Title: Re: Error with SaveFileDialog
Post by: kdub_nz on February 17, 2016, 02:49:42 AM

(http://www.theswamp.org/screens/mp/thumbsup.gif)