The easiest way to load the file is:

ModelLoader loader = new ModelLoader();
Scene scene = loader.load("C:\columbia.dxf");

There are other examples included in the NCSA Portfolio documentation.

We've corrected some bugs and added some features to the loaders.  One
problem in particular that broke a few of the loaders (all the binary file
formats) was how the defaults fro Reader classes are implemented in Java
2.   We've fixed that bug here.  If you can't get the file to load
correctly, please send me the file, and I'll see if we can get it to load
here with the updates.  The next version should be out fairly soon (I'm
doing builds and testing them now).

Steve


Matthew Carpenter wrote:

> I am having a problem loading a DXF file with the NCSA Portfolio
> loader.  It's telling me that:
>
> This method is not implemented in ModelLoader
> Use load(Reader reader, String ext) instead.
> Exception in thread "main" java.lang.NullPointerException:
> ....
>
> so I implement some form of the method listed using "dxf" as the String
>
> Now I get:
>
> java.lang.NullPointerException
> Exception in thread "main" java.lang.NullPointerException.
> ....
>
> here is the relevant code:
>
>  public void init() {
>  Canvas3D mCanvas3D = new Canvas3D(null);
>  add ("Center", mCanvas3D);
>  SimpleUniverse u = new SimpleUniverse(mCanvas3D);
>
>  File mFile = new File("C:/columbia.dxf");
>  ModelLoader mLoader = new ModelLoader();
>  try {
>   u.addBranchGraph(mLoader.load(new FileReader(mFile),
> "dxf").getSceneGroup())
>  } catch(FileNotFoundException e) {System.out.println(e);}
>  }
>
> Thanks for your help!
> Matt
> _____________________________________________________________
> Do You Yahoo!?
> Free instant messaging and more at http://messenger.yahoo.com
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

--
Steve Pietrowicz - [EMAIL PROTECTED]    Project Manager - NCSA Java 3D Group

NCSA Portfolio:      http://havefun.ncsa.uiuc.edu/Java3D/portfolio/
   New Beta 2a release!  New Loaders, record and replay of your
   Java 3D apps and more! Freely available for non-commercial use!
You Build It VR:     http://havefun.ncsa.uiuc.edu/Java3D/YouBuildItVR/
   Build your own multi-user virtual worlds with no programming experience!
The Java3D FAQ:      http://tintoy.ncsa.uiuc.edu/~srp/java3d/faq.html
Java News Network:   http://tintoy.ncsa.uiuc.edu/~srp/java/javanews.html



=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to