How to open a DWG file with AutoCAD options (AppleScript)?

Hi,
I'm looking for help specifying the AutoCAD options when opening DWG files.  I have DWG files of floor plans that I always want to open at the same scale. 
I can successfully open a DWG file with the default options using:
open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias without dialogs
But I don't want the default options, so if I try to specify them:
open POSIX file "/Users/crmckinnon/Desktop/cabin_floor_plan.dwg" as alias with options {class:AutoCAD options, scale unit:"autocad inches"} without dialogs
I get a "Can't find alias" error.  How do I specify the AutoCAD options?  I'm sure this is due to my lack of understanding of AppleScript.  Any help would be appreciated!
Thanks,
Chris

I'll answer my own question.  Here's how I specified the options:
open POSIX file filePath as alias with options {pGSO:original size, pASU:inches, pASR:12.0 / 0.1875} without dialogs
I had to look in the Apple Script dictionary to get the "codes" to use.  The variable names didn't work.  I think that's because some have "global" in the name which is a keyword in Apple Script.  Here's what the codes translate to:
pGSO = "global scale options"
pASU = "scale unit"
pASR = "scale ratio"
Thanks,
Chris

Similar Messages

  • How to open a ".doc" file with ms word directly with this servlet?

    Here is a servlet for opening a word or a excel or a powerpoint or a pdf file,but I don't want the "file download" dialog appear,eg:when i using this servlet to open a word file,i want open the ".doc" file with ms word directly,not in IE or save.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class OpenWord extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {
    String strFileName = req.getParameter("filename");
    int len = 0;
    String strFileType1 = "application/msword";
    String strFileType2 = "application/vnd.ms-excel";
    String strFileType3 = "application/vnd.ms-powerpoint";
    String strFileType4 = "application/pdf";
    String strFileType = "";
    if(strFileName != null) {
         len = strFileName.length();
         if(strFileName.substring(len-3,len).equalsIgnoreCase("doc")) {
              strFileType = strFileType1;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("xls")) {
              strFileType = strFileType2;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("ppt")) {
              strFileType = strFileType3;
         } else if(strFileName.substring(len-3,len).equalsIgnoreCase("pdf")) {
              strFileType = strFileType4;
         } else {
              strFileType = strFileType1;
    if(strFileName != null) {
         ServletOutputStream out = res.getOutputStream();
         res.setContentType(strFileType); // MIME type for word doc
    //if uncomment below sentence,the "file download" dialog will appear twice.
         //res.setHeader("Content-disposition","attachment;filename="+strFileName);
         BufferedInputStream bis = null;
         BufferedOutputStream bos = null;
         String path = "d:\\"; //put a word or a excel file here,eg a.doc
         try {
         File f = new File(path.concat(strFileName));
         FileInputStream fis = new FileInputStream(f);
         bis = new BufferedInputStream(fis);
         bos = new BufferedOutputStream(out);
         byte[] buff = new byte[2048];
         int bytesRead;
         while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
         bos.write(buff, 0, bytesRead);
         } catch(NullPointerException e) {
         System.out.println ( "NullPointerException." );
         throw e;
         } catch(FileNotFoundException e) {
         System.out.println ( "FileNotFoundException." );
         throw e;
         } catch(final IOException e) {
         System.out.println ( "IOException." );
         throw e;
         } finally {
         if (bis != null)
         bis.close();
         if (bos != null)
         bos.close();

    Hello!
    Does some one of you had open a MS word file (.doc) in Java search for a token like [aToken] replace it with another text and then feed it to a stream of save it?
    I want to build a servlet to open a well formatted and rich on media (images) ms word document search for tokens and replace them with information form a web form.
    Any Ideas?
    Thank you in advanced.

  • How to open a jpg file with Adobe Camera Raw

    I know it is possible to open a jpg file with Adobe Camera Raw using Bridge but is it possible to do this using PSE7?  Thanks.

    Yes. In the editor, File>Open As, and choose camera raw as the format. John Ellis also has a script for doing this directly from the organizer, but I don't have the link right at the moment. Hopefully he'll be along with it sooner or later.

  • How to Open a rar file with downloaded software

    I was bothering this forum yesterday trying to find some way to get a file opened that I had downloaded. Today I discovered that my problem was that "rar" files need their own software to enable them to be opened....So I downloaded the software UnRarX...and it is now sitting on the bottom of my desktop...but I can not get the software into the Applications folder, and so I can not figure out how to use this little package of software to open my "rar" files...
    What do I have to do to open my files with this new software???
    Thanks..
    Miguel

    HI,
    The UnRarX application should be accessible from your Dock after installing the software. The application icon looks like this:
    "How to extract a rar archive?"
    1. Launch UnRarX.
    2. Drag rar archive into the UnRarX window.
    3. Extraction begins automatically.
    Carolyn

  • How to open a .DOC file with MS-Word ?

    Hye fellow Java freaks,
    I have made an application to upload .DOC and .RTF files to the server using servlets and the Jakarta Commons FileUpload package.
    The files are uploading successfully.
    Now, I want to place a link to the most recently uploaded file and then, on clicking that link, I want the file to open not in the browser, rather with MS-Word.
    What is the servlet code that I should implement to accomplish this ?
    Any suggesions ?
    Thanx in advance.

    I think this is a client-side issue - how the browser chooses to deal with the .doc file it receives.
    You can 'save as' and then open the file by hand.
    --Jon                                                                                                                                                                                                                                                                                                                               

  • How to open an excel file with password in Crystal Reports XI  Release 2

    I have a problem when i try to open an excel 2003 file with password that i know
    i recevived an error code 0xc59
    How can I open a file in excel 2003 protected by password to create the report?
    Thanks in advanced

    Hi Pierluigi,
    It looks like you have to open the excel file and use the data.
    A few informative links.
    http://support.microsoft.com/kb/257819#RetrieveExcel
    http://support.microsoft.com/kb/211378/EN-US/
    Hope this helps.
    Regards,
    Abhijeet Taskar.

  • How to open a .MOV file with Maverick?

    Hello,
    I  recorded some videos with my iPhone 4S. i sync it then with my computer, but it says that it can not open them. Why? How can i open .MOV files with my computer (running with Maverick 10.9.4) ?

    Try VLC.
    Video Player - VLC
    More.
    Video Player - Divx
    Video Player – Flip4Mac

  • How to open a ai file with some layers named in Japanese with a AI CS5(English Ver)

    I can't open some ai files that may contains some layers named in Japanese. I am using AI CS5 (Eng Ver) and how can I open them?
    Thx!

    At worst you should be getting garbage substituted characters just like when you don't have specific fonts on text objects, but otherwise you should be able to open the file. The only thing that could prevent this otehrwise is something systemic, so you may need to install support for Asian languages (in particular if you are still on Windows XP) or even switch the UI language.
    Mylenium

  • How to open a pdf file with command in WebBrowser control?

    Installed acrobat 6 or7 in my PC, then I load a WebBrowser control in IE to open a local pdf file with command line, such as "Page=3", and then open the same pdf file with WebBrowser control in other IE process, I found the command will affect other open and show operations in webbrowser. is it normal?  That is to say, When i set command "Page=3", the second time WebBrowser still open pdf with command "Page=3",I think it is bad.

    Hello:
    Thanks for your reply. I installed Acrobat6.0 or 7.0 in my PC, then i load a WebBrowser Control in IE by Html, then open local pdf with different command by running IE. We can get the command in this website: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
    First:open local pdf with command : oWebBrowser.Navigate("G:
    PDF
    07000001.pdf#Page=3&Pagemode=thumbs", null, null, null, null);
    Second:Open the same local pdf with no command:  oWebBrowser.Navigate("G:
    PDF
    07000001.pdf", null, null, null, null)
    【Result】The first command "#Page=3&Pagemode=thumbs" will effect the way of showing pdf when second open. But, the phenomenon will not appear in Acrobat 8.0, 9.0, 10.0.

  • How to open a text-file with notepad from labview-vi?

    Hello,
    how can i execute a program from a vi?
    I want to open a textfile with Windows7-Notepad after selelecting it from a file-path-control and pressing an open-button.
    Thx for help
    Solved!
    Go to Solution.

    Use the command line.  Something like cmd /c notepad c:\temp\blah.txt should work.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to open newer version file with older version software?

    Recently I downgraded my mac due to Maverick failed to support gdb(I really hate that lldb stuff). And it turned out that the file I used to edit in newer version of mac failed to open. It says I need to update my software to newer version. The thing is, I really don't want to use Maverick now until it resupport gdb. So are there any other ways to open those files?

    HI,
    The UnRarX application should be accessible from your Dock after installing the software. The application icon looks like this:
    "How to extract a rar archive?"
    1. Launch UnRarX.
    2. Drag rar archive into the UnRarX window.
    3. Extraction begins automatically.
    Carolyn

  • How to Open an Indesign file with a missing plugin

    Is there a way to open a file that has a missing plugin?
    This is the case:
    We used an outside designer who is on CS5 indesign and teacup barcode software plugin cs5
    We received his files saved back to CS4, but it is still telling us there is a missing plugin.
    I'm assuming it is Teacup software. Is there a way around this??

    Jenna Hamilton wrote:
    Is there a way to open a file that has a missing plugin?
    This is the case:
    We used an outside designer who is on CS5 indesign and teacup barcode software plugin cs5
    We received his files saved back to CS4, but it is still telling us there is a missing plugin.
    I'm assuming it is Teacup software. Is there a way around this??
    You should try to be as accurate as possible when describing your situation. For example, you say the file was “saved back to CS4”. That is impossible. There is no way to save an InDesign CS4 file from any program except InDesign CS4. Do you mean that the designer exported an .idml file from InDesign CS5? If so, then say so. If you have been given an InDesign .indd file saved from InDesign CS5, then you have an InDesign CS5 file, not an InDesign CS4 file.

  • How to open Premiere CS6 files with Premiere CS5.5

    Hi, I've ran into a problem I recently got the Premiere CS6 trial and had done some projects on it that I started in CS5.5, but now the trial expired and many of my projects are stuck as CS6 files. Luckly I was able to put the trial on one of my older computers so i can still access the files for now but its extremely slow and the rendering takes forever so I dont want to render out any projects on that.
    I know that Premiere is not backwards compatible but is there anyway to export the file or convert it to a CS5.5 file? I need to export the project by tommorrow and my old computer wont have it done by then. I will be buying CS6 in a couple weeks here but right now I cannot afford to. Any help would be greatly appreciated.

    Use the original project files from CS5.5. You had to enter a new file name for CS6, so using the CS5.5 names will solve it under CS5.5. It will not solve the editing you did, that is lost (unless you dare to modify the XML files).

  • How to repear a corrupt file with Numbers

    How to open a "corrupt" file with Numbers.
    With excel it is possible to open such a file with the following error message :
    "The file you are trying to open, 'filename.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"
    Clicking YES, the file is opening correctly with XLS.
    How to do the same with Numbers?
    When i try to open the same file with numbers i have no "error message" but the information contained in the file is not readable.
    Many thanks for your help

    Yeah that's true to an extant; microsoft did a good job fixing that but unfortunately allowed it to be re-introduced in 2006 with windows vista where they allowed file naming to receive destructive values (wasn't very fond of this);
    in previous versions of windows such values once entered would be followed by an error message telling you those values couldn't be used
    I wasn't aware it would pop its ugly head back up into windows 7 but I see otherwise as in the case of mine
    (I forgot to mention the period preceded a parenthesis which in turn can be destructive to the file's original format)
    Anyway photoshop wont open the file after changing it to .psd leaving an error message stating....
    'Could not complete your request because the file is not compatible with this version of photoshop'

  • How to open a doc file using jsp Anchor tag

    when i am trying to open a doc file using a jsp it is opening with out proper alignment.
              how to open a doc file with proper alignment using Anchor Tag in JSp Page
              

    Hello!
    Does some one of you had open a MS word file (.doc) in Java search for a token like [aToken] replace it with another text and then feed it to a stream of save it?
    I want to build a servlet to open a well formatted and rich on media (images) ms word document search for tokens and replace them with information form a web form.
    Any Ideas?
    Thank you in advanced.

Maybe you are looking for