Contributors

VRMLworks

comp.lang.vrml FAQ Answers
7. Questions nobody asked

  1. Stupid registry tricks for VRML in Win95

    If you don't have a VRML modeler and are building VRML worlds with a plain text editor, how can you make things easy on yourself?

    You can start off with an empty file and start typing "#VRML V2.0 utf8", but that gets tedious after a while. A lot of the time there's things you repeat from file to file.

    Here's how (in Win95):

    Step one: run the registry editor (C:\Windows\Regedit.exe).

    Open HKEY_CLASSES_ROOT and look for the ".wrl" extension. Right-mouse on the ".wrl" beside the folder and select New/Key. Name the key ShellNew.

    Click on the folder named ShellNew you just created, right-mouse inside the right-hand window and select New/String Value. Name the string value FileName. Right-mouse on FileName and select modify. Change the value in the string (it starts off as "") to "vrml.wrl". You don't need to type the quotes.

    Now exit the registry editor.

    Step two: using the Explorer, go to C:\Windows\ShellNew. Use your favorite editor to create a file. Fill in some suitable content. Here's what I use in mine [right mouse (PC) or mouse and hold (Mac) to download].

    You could simply have your file contain:

    #VRML V2.0 utf8
    Group {
    }

    Make it as simple or as fancy as you like. Whenever you create a new VRML file, the file will be initialized to contain that text.

    Now save the file in the C:\Windows\ShellNew folder and rename it "vrml.wrl".

    Step three: using the Explorer, go to another folder and right-mouse in the right-hand pane. Select New/VRML 3D Geometry (depending on your installation, the name in the window when you right-mouse and select New may differ from "VRML 3D Geometry", but you can figure it out).

    Rename the file you created to anything (say, foo.wrl).

    Using your favorite text editor, edit the new file, and you'll notice that your new file has been initialized to what you put in C:\Windows\ShellNew\vrml.wrl. Oh, I already said that. Well, no surprise.

    You now have a means of creating a new VRML file anywhere, and that file can be given some initial contents to save you some typing gruntwork.

  2. More stupid registry tricks

    There are so many things you can do with a VRML file. You can view it in your web browser with your favorite plugin, you can use a stand-alone app like GLView, you can edit it with your favorite modeler, or you can just text-edit the file.

    What to do with all those choices? In Windows 95, you can open an Explorer window and select View/Options... Click the File Types tab and search for the type for VRML (in systems that ever installed Live3D, it's probably "VRML 3D Geometry").

    Select that name and click Edit. Under Actions, you'll see "open" and perhaps something else (e.g., edit). If you installed V*Realm builder, you probably want to edit the entry for "open" and change it back to Netscape or MSIE.

    Below that little pane select New. In the window that appears, select an appropriate name for Action. I've got 10 different things including Vim, GLView, some builders, and gzip on mine. Use Browse to select the application you named or just type in the path if you know it. If the program doesn't come up and open your file, you may need to add "%1" to the end of the string for the application. Note also that if there are any spaces in the pathname, you'll need to enclose the pathname and the "%1" in double quotes.

    While you're at it, you may want to change the default icon for a VRML world. I personally think the Live3D and Cosmo Player icons are ugly. I've got some I like better at the VRMLworks.

    Now when you double-click on a .wrl file, up comes your web browser (the default for the action "open") just like before.

    When you right-mouse on the icon, you see the actions you named, and when you select one, the appropriate application comes up and loads your .wrl file. Some applications like gzip are destructive, so as you're experimenting, use a copy of a VRML file, not an original.

    Incidentally, there's a utility on the PC Magazine site called MultiLaunch, but MultiLaunch does not bring you up in the current folder. Doing it this way does.

[line]

Did I leave something out on one of these questions that you need to know? Let me know.

-- Bob Crispen
-- Wednesday, June 3, 1998