YCAD Library Usage

江枫思渺然 提交于 2019-12-08 07:19:27

问题


I started using the YCAD Library. The problem is that I cannot find any usage instructions and I am kind of confused because I have no idea how to use it. I am hoping that somebody here used it before or is using it now so he/she can give me some tips how to use the library.

Thank you in advance.

PS.

One of the requirements for the project is to develop it in Java. I know that there are some good libraries in C#, C++, etc. but I need to do it in Java.

Best regards, Dimitar Georgiev


回答1:


Import the classes such as com.ysystems.ycad.lib.yxxf.Yxxf.

Open the file object:

File flname = new File(filename);

Open the buffered input stream with the file:

BufferedInputStream is = null;

Open the buffered stream:

is = new BufferedInputStream(new FileInputStream(flname ));

Create the Yxxf object:

Yxxf dxfDrawing = new Yxxf();

Create the YdxfGetBuffer:

YdxfGetBuffer buffStream = new YdxfGetBuffer();

Set the type:

int typ = YdxfGetBuffer.GET_TYPE_MAIN; 
buffStream .setInput(typ, in, drawing);
YdxfGet.get(buffStream );

After this, you may probably find the objects and iterate through.



来源:https://stackoverflow.com/questions/23512202/ycad-library-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!