Wout Ware

September 10, 2010, 02:26:57 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: issue with VPORT  (Read 154 times)
vjedlicka
Member
*
Posts: 66


« on: March 17, 2010, 09:16:41 pm »

I exported my data to a DXF draing using CadLib 3.5
The drawing opens fine with DWG DXF Sharp Viewer,
but not with DWG TrueView 2010.

The error message is
Opening an AutoCAD 2007 DXF file.
Regenerating model.
_RIBBON
COMMANDLINE
_DWGPROPS
_EXPORTPDF
Error in VPORT Table
Bad height:0.000000 on line 1380.
Error in VPORT Table
Bad height:0.000000 on line 1380.

I probably neglected to create something about VPORT.
I do not know what VPORT is. Can you please briefly explain
what might be wrong and how i can fix it?



Thank you
Vaclav
Logged
wout
Administrator
Member
*****
Posts: 837


« Reply #1 on: March 18, 2010, 01:57:48 pm »

Hi Vaclav,

Could you attach the DXF file that you produced?

Thanks!

Wout
Logged
vjedlicka
Member
*
Posts: 66


« Reply #2 on: March 19, 2010, 12:14:34 pm »

It happens with the WriteDXF sample distributed with CadLib.

Nevertheless I fixed the issue by creating a default VPort, setting its height to 1000 and adding it to the model.

I suggest you to update the sample.

Thanks
Vaclav

BTW I could not upload the file because of the size limit, and when I zipped it I realized zip extension is not allowed!
Logged
wout
Administrator
Member
*****
Posts: 837


« Reply #3 on: March 19, 2010, 01:50:12 pm »

Hi Vaclav,

Could you e-mail me the DXF file (the write example creates 3 files, so not sure which one has your error)? The current CadLib 3.5.6.4 version doesn't create a default VPORT. If you want to create a default VPORT, you could use method DxfVPort.CreateActiveVPort(), which sets the height to a default value of 1.

Thanks,

Wout
Logged
vjedlicka
Member
*
Posts: 66


« Reply #4 on: March 19, 2010, 08:35:54 pm »

Yes, that is what I did.

Code:
DxfVPort vport = DxfVPort.CreateActiveVPort();
 vport.Height = 1000;
 model.VPorts.Add(vport);

Without this code I get the error mentioned above.

Vaclav
Logged
wout
Administrator
Member
*****
Posts: 837


« Reply #5 on: March 19, 2010, 09:58:15 pm »

Hi Vaclav,

Would you mind e-mailing me the DXF file, because I don't yet understand what's wrong. The CreateActiveVPort method does this:

Code:
public static DxfVPort CreateActiveVPort() {
DxfVPort vport = new DxfVPort();
vport.Name = ActiveVPortName;
            vport.Height = 1d;
return vport;
}

So theoretically the height shouldn't be 0 unless it was set to 0 explicitly.

Thanks!

Wout
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!