Hi Vladimir, so you'll need to edit the open command that the operating system shell uses to launch MoI when you double click on a .dxf file. That will be in the system registry so you'll need to run regedit.exe .
Inside regedit do Ctrl+F and search for MoI.DXFFile.1 - that's an entry that the MoI installer will set up as the progid to use for opening files with the .dxf file extension. If you have manually set up the handling for .dxf files instead of having the default that the MoI installer sets we may need to look somewhere slightly different (You'd need to instead search for .dxf and see what "OpenWithProgids" are set for it and then look for that progid).
But if you have MoI.DXFFile.1, expand it and there are 2 child entries below it named "DefaultIcon" and "shell". Expand shell down to shell > open > command and highlight "command". Now on the right-hand pane there should be a value set like this:
"C:\Program Files\MoI 4.0 beta Oct-17-2018\moi.exe" "%1"
This is the command line that the operating system will use for opening a .dxf file - it's saying to run moi.exe and the %1 part will be the .dxf filename sent in to moi.exe as a command line parameter. The " " quotes around those are needed to make text with spaces in it treated as one single parameter.
So you'll need to modify that to add an additional parameter for a .js script file, like this:
"C:\Program Files\MoI 4.0 beta Oct-17-2018\moi.exe" "%1" "c:\scripts\opendxf.js"
Then you'll need to create a text file at c:\scripts\opendxf.js (or wherever you wish it to be, just make sure to put " " around it if it has any spaces) and that script file should then run after a .dxf file is opened from the OS shell.
The contents of the opendxf.js file can do various things, to set the top view to be maximized try putting this inside of the .js file:
moi.ui.mainWindow.viewpanel.mode = 'Top';
Let me know if that does not work, I have not tested it here yet.
- Michael
|