plot coordinates in VB and save as autocad or DXF file

plot coordinates in VB and save as autocad or DXF file

Page 1 of 1

5 Replies - 15814 Views - Last Post: 19 September 2007 - 11:51 PM Rate Topic: -----

#1 EMMADDAI  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 15-November 06

plot coordinates in VB and save as autocad or DXF file

Posted 28 November 2006 - 07:35 AM

WOULD SOMEONE PLEASE HELP ME WITH THIS TOPIC. I AM A LEARNER IN VB AND ALL EFFORTS AT DOING THIS HAS PROVED FUTILE. THANKS.
i want to plot coordinates using my vb application and save or plot them as autocad file without necessarily opening autocad

This post has been edited by William_Wilson: 19 September 2007 - 09:38 AM

Is This A Good Question/Topic? 0
  • +

Replies To: plot coordinates in VB and save as autocad or DXF file

#2 KeyWiz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 438
  • Joined: 26-October 06

Re: plot coordinates in VB and save as autocad or DXF file

Posted 28 November 2006 - 04:51 PM

View PostEMMADDAI, on 28 Nov, 2006 - 07:35 AM, said:

WOULD SOMEONE PLEASE HELP ME WITH THIS TOPIC. I AM A LEARNER IN VB AND ALL EFFORTS AT DOING THIS HAS PROVED FUTILE. THANKS.
i want to plot coordinates using my vb application and save or plot them as autocad file without necessarily opening autocad



This is a tricky one. If you have Autocad installed on your computer the .dll or .com files used by AC will be listed, you have to reference these from the VB environment. On my older system with AutoCad, it is AutoCad 14 Files .The thing is, if you plan on distributing you software in any form you will have to aquire a lisence from AC to distribute their files. This is also true if your are going to write an application which creates certain copyrighted extensions-processes.

When you install any software on your computer and the necisary .dll and .com files are added to your system, they will all be visible to Visual Basic. This does not grant you the right to redistribute those .dll and .com files with your software. It does grant you the right to access them as intended. I believe AutoCad offers a free viewer for their image files, but to create a custom app which uses their proprietary files would legally require your consumer to first purchase AutoCad.
Was This Post Helpful? 0
  • +
  • -

#3 ikerbera  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-September 07

Re: plot coordinates in VB and save as autocad or DXF file

Posted 19 September 2007 - 07:37 AM

Hi,
My question is not related with the first topic, but since is about autocad I decide to post here:

I'm developing an application in VB6 that makes several things with autocad, one of them is plotting .dwg files to plt files and later print them but I have a problem setting the printer. I can add a .pc3 file and a .ctb file, but if the .pc3 file had a .ctb file attached it keeps it and don't select the .ctb I give.

Here is where I plot the .dwg to file:

Sub Generar_PLTs()
	If frmPlotear.chkZoom.Value Then AcadApplication.ZoomExtents

'Adds the .ctb path and filename or none
	AcadApplication.Activedocument.Application.Preferences.Output.DefaultPlotStyleTable = "ninguno"
	If frmPlotear.txtCTB.Text <> "Ninguno" Then
		AcadApplication.Activedocument.Application.Preferences.Output.DefaultPlotStyleTable = frmPlotear.txtCTB.Text
	End If
'None is selected	
	If frmPlotear.txtPC3.Text = "Ninguno" Then
		Resultado = AcadApplication.Activedocument.Plot.PlotToFile(Left(FichDWG, Len(FichDWG) - 4))
		'Resultado = AcadApplication.Activedocument.Plot.PlotToDevice(Printer.DeviceName)
	Else
'One is selected
		Resultado = AcadApplication.Activedocument.Plot.PlotToFile(Left(FichDWG, Len(FichDWG) - 4), frmPlotear.txtPC3.Text)
		'Resultado = AcadApplication.Activedocument.Plot.PlotToDevice(frmPlotear.txtPC3.Text)
	End If

	Tiempo = Now
	Do
	Loop Until Now - Tiempo > 0.0004
	
	AcadApplication.Update
End Sub

Was This Post Helpful? 0
  • +
  • -

#4 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 205
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

Re: plot coordinates in VB and save as autocad or DXF file

Posted 19 September 2007 - 09:40 AM

Please do not use all capitals in your message or your title, it does not get you more help. Please read the rules for further clarification.

i would suggest creating an empty autocad file, and another with simple points to start w/ these will give you the base code you will need to implement by viewing it as text, or bytes. You can then adapt the code to implement more features.
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: plot coordinates in VB and save as autocad or DXF file

Posted 19 September 2007 - 10:34 AM

View Postikerbera, on 19 Sep, 2007 - 07:37 AM, said:

Hi,
My question is not related with the first topic, but since is about autocad I decide to post here:

I'm developing an application in VB6 that makes several things with autocad, one of them is plotting .dwg files to plt files and later print them but I have a problem setting the printer. I can add a .pc3 file and a .ctb file, but if the .pc3 file had a .ctb file attached it keeps it and don't select the .ctb I give.


Do not hijack someone else's post, this isn't allowed and quite frankly is rude. If you a questions please create your own thread, this gentleman is looking for assistance and you had no right taking over the thread with your question :)
Was This Post Helpful? 0
  • +
  • -

#6 ikerbera  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-September 07

Re: plot coordinates in VB and save as autocad or DXF file

Posted 19 September 2007 - 11:51 PM

View PostPsychoCoder, on 19 Sep, 2007 - 10:34 AM, said:

Do not hijack someone else's post, this isn't allowed and quite frankly is rude. If you a questions please create your own thread, this gentleman is looking for assistance and you had no right taking over the thread with your question :)

I'm sorry, I just wanted not to fill the forum with unnecessary threads :wub:

This post has been edited by ikerbera: 20 September 2007 - 08:02 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1