YCAD 库使用 [英] YCAD Library Usage
问题描述
我开始使用 YCAD 库
.问题是我找不到任何使用说明,我有点困惑,因为我不知道如何使用它.我希望这里有人以前使用过它或现在正在使用它,以便他/她可以给我一些如何使用该库的提示.
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.
提前致谢.
附注.
该项目的要求之一是使用 Java
进行开发.我知道在 C#、C++ 等中有一些很好的库,但我需要在 Java
中完成.
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
推荐答案
导入com.ysystems.ycad.lib.yxxf.Yxxf
等类.
打开文件对象:
File flname = new File(filename);
用文件打开缓冲的输入流:
Open the buffered input stream with the file:
BufferedInputStream is = null;
打开缓冲流:
is = new BufferedInputStream(new FileInputStream(flname ));
创建Yxxf
对象:
Yxxf dxfDrawing = new Yxxf();
创建YdxfGetBuffer
:
YdxfGetBuffer buffStream = new YdxfGetBuffer();
设置类型:
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.
这篇关于YCAD 库使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!