Open [form.]control.Open <DWG/DXF filename> [DWG password] [Zoom Extents] DWG/DXF filename: A filename and path to a drawing file DWG password: A password for the drawing file ZoomExtents: Allow the drawing to be opened at the extents Return Boolean (1),(2),(3) This is used to open (load) the CAD filename into the DDVue component so that information can then be accessed. It is very important that each opened drawing is closed and calling the Close method performs this. From AutoCAD 2004 drawing files in DWG format a password can be assigned to the file, the password must be passed as a parameter so that DDVue can open the drawing.用这个函数传参有问题 打不开CAD 文件 还请指教该函数如何使用
axDDVue1.Open(ofd.FileName,"",0); 参数写全 应该可以
OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "DWG文件|*.dwg"; ofd.Multiselect = false; if (ofd.ShowDialog() == DialogResult.OK) { // pictureBox1.Image = GetDwgImage(ofd.FileName);
自己找找
或者看看它的文档
[form.]control.Open <DWG/DXF filename> [DWG password] [Zoom Extents]
DWG/DXF filename: A filename and path to a drawing file
DWG password: A password for the drawing file
ZoomExtents: Allow the drawing to be opened at the extents
Return Boolean
(1),(2),(3)
This is used to open (load) the CAD filename into the DDVue
component so that information can then be accessed.
It is very important that each opened drawing is closed and calling the
Close method performs this.
From AutoCAD 2004 drawing files in DWG format a password can be
assigned to the file, the password must be passed as a parameter so
that DDVue can open the drawing.用这个函数传参有问题 打不开CAD 文件 还请指教该函数如何使用
参数写全 应该可以
ofd.Filter = "DWG文件|*.dwg";
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
// pictureBox1.Image = GetDwgImage(ofd.FileName);
axDDVue1.Open(ofd.FileName,"",0);
axDDVue1.Caching = true;
}
}