Hi
Is there any way to convert an autocad file(.Dwg) into PDF using DWG True view in VB6 application?
The manual steps are
1. open an 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
A .dwg file will be selected from the application and it should get converted to pdf using DWG True view. Is this possible?
I have added acctrl.dll in VB reference. Please tell the functions to be used for pdf convertion.
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.
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")
5. 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
4.
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
Hi
Installed DWG TrueView 2011, Windows 7 (32bit)
I tried what you suggested but with no success. It works when I publish the file using the DWG TrueView application and it generates the PDF in the correct destination folder as specified in the registry under Location
When I run the code and call SilentPublish the Publish Job Progress dialog does appear indicating that the file is being processed but when I look at the destination folder nothing is created.
Here is my code:
'==Registry settings
'[HKEY_CURRENT_USER\Software\Autodesk\DWG TrueView\R8\DWGVIEWR-9001:409\Profiles\<<Unnamed Profile>>\Dialogs\AcPublishDlg]
'"Location"="D:\\Scans"
AxAcCtrl1.PutSourcePath("D:\TestFile.dwg")
Dim pArray() As String = New String(0) {"D:\TestFile"}
AxAcCtrl1.SilentPublish(pArray)
Please let me know what else I could try to get it to work
Hi ,
I have same problem,
registry setting has changed but viewer always publish silent to : C:\Users\<%username%>\AppData\Local\Temp
and only dwf files with temporary names. I'm tried to change type publish to PDF or DWF'X 3d
and location not result. Obviously, possible to plot only dwf file to temporary folder.
Thanks for help,
Best wishes,
Michael
Not sure what VB6 means. However if you're just trying to convert a .dwg to a .pdf on True View, all you have to do is:
Select plot:
Select Dwg to Pdf.pc3 from the drop down printer/plotter menu
Save in the directory you specify and you're good to go.