Setting the exact location of the export

This topic has been viewed 4910 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
Mitsaki
Posts: 62
Joined: Tue Jul 26, 2011 2:27 pm

Setting the exact location of the export

Post by Mitsaki »

Hello again,

what I want to do is to modify the existing interface, so that when the export to .obj file runs, the window, that the user uses in order to save the project, doesn't run and the project is saved directly in a desirable path.

Do you know where I should look to find the place that this is done, in which class?

I would really appreciate it.
Mitsaki
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Setting the exact location of the export

Post by Puybaret »

The path of the SH3D file is simply returned by the getName method of the Home object.
Emmanuel Puybaret, Sweet Home 3D creator
Mitsaki
Posts: 62
Joined: Tue Jul 26, 2011 2:27 pm

Re: Setting the exact location of the export

Post by Mitsaki »

To do what I need, I just used the class

Code: Select all

FileContentManager

and I added blocked comment in the row 471-475, so the dialog box does not appear, like this and as savedName I put Our_home.

Code: Select all

  String savedName;
    savedName = "Our_home";
    // Use native file dialog under Mac OS X    
/*    if (OperatingSystem.isMacOSX()) {
      savedName = showFileDialog(parentView, dialogTitle, contentType, name, true);
    } else {
      savedName = showFileChooser(parentView, dialogTitle, contentType, name, true);
    }*/
The only thing that is missing now is to set the file, so that it is not saved automatically inside the sweethome3d folder, in workspace, but outside of it.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests