DWG TrueView

Reply
Member
Minu_vb
Posts: 5
Registered: ‎07-06-2010
Message 1 of 7 (2,487 Views)

PDF conversion using dwg true viewer in VB6

2487 Views, 6 Replies
07-06-2010 02:12 AM

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

Member
Minu_vb
Posts: 5
Registered: ‎07-06-2010
Message 2 of 7 (2,449 Views)

Re: PDF conversion using dwg true viewer in VB6

07-13-2010 11:32 PM in reply to: Minu_vb

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.

Member
Minu_vb
Posts: 5
Registered: ‎07-06-2010
Message 3 of 7 (2,430 Views)

Re: PDF conversion using dwg true viewer in VB6

07-15-2010 09:52 PM in reply to: Minu_vb

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.

Member
Minu_vb
Posts: 5
Registered: ‎07-06-2010
Message 4 of 7 (2,395 Views)

Re: PDF conversion using dwg true viewer in VB6

07-20-2010 06:48 AM in reply to: Minu_vb

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

New Member
FanieEnMelanie
Posts: 1
Registered: ‎11-28-2010
Message 5 of 7 (1,982 Views)

Re: PDF conversion using dwg true viewer in VB6

11-28-2010 06:25 PM in reply to: Minu_vb

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

Contributor
tint
Posts: 20
Registered: ‎05-15-2007
Message 6 of 7 (1,253 Views)

Re: PDF conversion using dwg true viewer in VB6

12-15-2011 07:02 AM in reply to: Minu_vb

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

Active Member
cad54
Posts: 10
Registered: ‎04-03-2009
Message 7 of 7 (963 Views)

Re: PDF conversion using dwg true viewer in VB6

05-16-2012 07:14 AM in reply to: Minu_vb

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community