PDF conversion using dwg true viewer in VB6

PDF conversion using dwg true viewer in VB6

Page 1 of 1

2 Replies - 2882 Views - Last Post: 20 July 2010 - 06:44 AM Rate Topic: -----

#1 Guest_Minu*


Reputation:

PDF conversion using dwg true viewer in VB6

Posted 30 June 2010 - 02:54 AM

Hi

Is there any way to convert an autocad file into PDF using DWG True view in VB6 application?
The manual steps are
1. open aa autocad file(.dwg) in dwg true view
2. click on 'Plot'
3. change the printer/plotter name (Dont know what to select for PDF convertion)

These steps need to be done using VB6.
Please help me

Thanks
Minu
Reply With Quote
Is This A Good Question/Topic? 0

Replies To: PDF conversion using dwg true viewer in VB6

#2 Guest_Minu_vb*


Reputation:

Re: PDF conversion using dwg true viewer in VB6

Posted 15 July 2010 - 09:40 PM

Hi

Through continuous searching my finding are the following

1. add acctrl.dll in reference
2. in component you can find the option 'acctrl component'. Select it and drag to the form
3. use the function
PutSourcePath("specify the path of file you need to view")
eg:
AcCtrl1.PutSourcePath ("D:\B-96043-01.dwg")
4. AcCtrl1.Plot ( this will open the print window)

Now i need to know
1. how to set 'adobe pdf' as plotter name
2. To set the destination path on which pdf converted file resides

Actually i dont want the print window to get opened. the pdf convertion should happen silently.

Please help me to resolve this.
Was This Post Helpful? 0

#3 Guest_Minu_vb*


Reputation:

Re: PDF conversion using dwg true viewer in VB6

Posted 20 July 2010 - 06:44 AM

Friends finally it got solved


1. add acctrl.dll in reference
2. in component you can find the option 'acctrl component'. Select it and drag to the form
3. use the function
PutSourcePath("specify the path of file you need to view")
eg:
AcCtrl1.PutSourcePath ("D:\B-96043-01.dwg")
4. dim str(1) as string
srt(0)=getsourcepath [Path of DWG file]
Acctrl.Silentpublish(str)

Now this will work only if i set a path in which the converted pdf file will get reside. That can be specified in the following path of registry

HKEY_CURRENT_USER\Software\Autodesk\DWG TrueView\R7\DWGVIEWR-8001:409\Profiles\<<Unnamed Profile>>\Dialogs\AcPublishDlg\Location

so in program you need to do the following task
1. check whether the path : HKEY_CURRENT_USER\Software\Autodesk\DWG TrueView\R7\DWGVIEWR-8001:409\Profiles\<<Unnamed Profile>>\Dialogs\AcPublishDlg
exist in registry. if not create it

2. update 'Location' with the desired path
3. Now run silentpublish function
Was This Post Helpful? 1

Page 1 of 1