DWG TrueView
Welcome to Autodesk’s DWG Trueview Forums. Share your knowledge, ask questions, and explore popular DWG Trueview topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ActiveX Control -- FINALLY

26 REPLIES 26
Reply
Message 1 of 27
smorris
4487 Views, 26 Replies

ActiveX Control -- FINALLY

I don't know if this has been posted yet,

However, I downloaded DWG True View 2008 with the specific purpose to find out whether a functional ActiveX control was made available for use...

and yes, it is.

Finally I can embed the True View control inside of my custom App. Nothing earth shattering but it simplifies my life tremendously.

AcCtrl.dll is the file.

The most basic method... to open a file... is .putSourcePath

so if you are using MSAccess for example, you can add an ActiveX Control, mine is named DWGVIEWERCtrl in the ActiveX list. Simply reference that control with your Access VBA code and use the putSourcePath method and pass the full file path as the only argument. It will start up the True View engine and load that file.


SAMPLE CODE: (where DWGViewer is the name of the control)

Me.DWGViewer.PutSourcePath Me.Fullpath



To those at AutoDesk who read these forums.....


THANK YOU
THANK YOU
THANK YOU
THANK YOU
THANK YOU
THANK YOU!!!!!!!!!!!!!!!!!!!!!!
26 REPLIES 26
Message 2 of 27
bbushmaker
in reply to: smorris

The ActiveX control installed by Trueview 2008 it not functioning properly in Internet Explorer 6.0. When viewing a DWG from the web, a blank window appears. I'm not sure if this has been encountered by anyone else. I have deleted the entries in the registry to disable the add-on in IE so the DWG app opens, however, in doing so, it disabled the import functionality in Design Review. Any help is appreciated.

Thank you.
Message 3 of 27
r_lucas
in reply to: smorris

Have you got any source code from the website that you would like to share?

I take it that when you are viewing the same page from Internet Explorer 7 it works fine?
Message 4 of 27
bbushmaker
in reply to: smorris

Thanks for the reply... Because IE6 is our current standard, I really haven't tested in IE7. DWG's / DXF's from any site, whether they are internal or external pull up to a blank window. Correct me if I'm wrong, source code shouldn't matter because IE should use whatever activex control is available to view the drawing in the browser?
Message 5 of 27
r_lucas
in reply to: smorris

I'm not sure whether the Object ID's are the same between different DWG True versions for example so it might not be able to use the correct control, but that is probably not your problem.

This is internet explorer running on Windows, anything could happen!
Message 6 of 27
smorris
in reply to: smorris

I have not tested it in IE, any version. I use it for a viewer inside custom written apps, and it works great.
Message 7 of 27
E_HA_HA
in reply to: smorris

I too am encountering the sam problem you posted on 5/02/07 regarding ActiveX controls not functioning with TrueView 2008. There is no known FAQ on their knowledgebase site referencing this. I am issuing an additional call for HELP!!!.

Thanks,
Message 8 of 27
Anonymous
in reply to: smorris

Kulak,

we can directly print a DWG from a custom app using it?
do you have an example?

Anderson

escreveu na mensagem news:5575249@discussion.autodesk.com...
I have not tested it in IE, any version. I use it for a viewer inside
custom written apps, and it works great.
Message 9 of 27
Anonymous
in reply to: smorris

http://jtbworld.blogspot.com/2007/05/dwg-trueview-used-as-activex-control.html
To plot use for example AxAcCtrl1.Plot() but it will just show the dialog
box so if you want to automate it, its not that simple.

--
Jimmy Bergmark
JTB World - Software development and consulting
Owner/Developer
http://www.jtbworld.com
http://jtbworld.blogspot.com

JTB World offers you software's, custom software development, consulting...
http://www.jtbworld.com/about.htm

JTB FlexReport (FLEXnet / FLEXlm license report tool) -
www.jtbworld.com/jtbflexreport

AutoCAD 2008
http://www.jtbworld.com/autocad2008.htm

"Anderson" wrote in message
news:5654009@discussion.autodesk.com...
Kulak,

we can directly print a DWG from a custom app using it?
do you have an example?

Anderson

escreveu na mensagem news:5575249@discussion.autodesk.com...
I have not tested it in IE, any version. I use it for a viewer inside
custom written apps, and it works great.
Message 10 of 27
Anonymous
in reply to: smorris

Hi,

Here is the code I am trying to implement but with no luck.
I am trying to use a button to open my frmDWG which has the AcCtrl1 embedded. I have a field with a URL to a dwg file and I want it to be passed via the button to the frmDWG form.
Any thoughts??

Bill

Private Sub cmdDWGview_Click()

Dim strFormName As String
Dim strCriteria As String

If NewFrom Then
MsgBox "This record contains no data." _
, vbInformation, "Invalid Action"
Exit Sub
Else
strFormName = "frmDWGview"
strCriteria = "[txtDWG] ='" & Me![txtDWG] & "'"

DoCmd.OpenForm strFormName, acViewPreview, , strCriteria

End If
End Sub
Message 11 of 27
Slingent
in reply to: smorris

Hi 'bbushmaker'

I need to do the same thing!
What registries did you have to delete/disable to get the DWG app to open up and NOT IE 6???? I have serach everywhere and this is driving me insane, trying to find the answer!
Please help!
Thanks in advance!

Steve
Message 12 of 27
Anonymous
in reply to: smorris

This is my code behind my button cmdRemoteDWG

Private Sub cmdRemoteDWG_Click()

Dim strFormName As String
Dim strCriteria As String

If Me.NewRecord Then
MsgBox "This record contains no data." _
, vbInformation, "Invalid Action"
Exit Sub
Else

strFormName = "frmDWGviewer"
strCriteria = "txtDwgURL ='" & txtURL & "'"

DoCmd.OpenForm strFormName, acViewNormal, , strCriteria
End If
End Sub
--------------------------------------------->
Code in the actual viewer
Private Sub Form_Load()
AcCtrl2.PutSourcePath txtURL
End Sub

Does this help?

Bill
Message 13 of 27
VDJEUGT
in reply to: smorris

Hi,
It seems this problem isn't solved since Autodesk DWG Viewer 2 😞
Try this:
Delete (or rename) this registry key (and subkeys):
HKEY_CLASSES_ROOT\CLSID\{6C7DC044-FB1E-4140-9223-052E5ABE7D24}\EnableFullPage
Message 14 of 27
Slingent
in reply to: smorris

Exactly what I was looking for!
Thank you very very very VERY much, VDJEUGT!!

I do hope that Autodesk will solve this issue! It was quite frustrating indeed.

S.
Message 15 of 27
Yogi189
in reply to: smorris

Thanks a lot for great explanation with example.

my requirement is one step ahead, I need to set the layer visibility using TrueView in DWG file and finally I want to export it as DWFx file programmatically.

All this i need to do through C# and without using activex control's unbuild toolbar for publishing.

But I am not able to do it, can some body guide me to get the things done.

Thanking you in advance.
Message 16 of 27
Anonymous
in reply to: smorris

To my knowledge the control does not expose any way to control layer
visibility.

--
Jimmy Bergmark
JTB World - Software development and consulting
Owner/Developer
http://www.jtbworld.com
http://jtbworld.blogspot.com

JTB World offers you software's, custom software development, consulting...
http://www.jtbworld.com/about.htm

JTB FlexReport (FLEXnet / FLEXlm license report tool) -
www.jtbworld.com/jtbflexreport

AutoCAD 2008
http://www.jtbworld.com/autocad2008.htm

"Yogi189" wrote in message news:5710334@discussion.autodesk.com...
Thanks a lot for great explanation with example.

my requirement is one step ahead, I need to set the layer visibility using
TrueView in DWG file and finally I want to export it as DWFx file
programmatically.

All this i need to do through C# and without using activex control's unbuild
toolbar for publishing.

But I am not able to do it, can some body guide me to get the things done.

Thanking you in advance.
Message 17 of 27
Yogi189
in reply to: smorris

Hi Jimmy,

Thanks for your quick reply.

Actually there is API to popup Layer manager dialogue of activex control and save updated visibility status as DWF file.

But what I need is DWFx.
I had tried to set PC3 file too, but not help....:(

TrueView utility supports DWG to be expose as DWFx using PLOT option.

I want same thing to be done with TrueView activex without plot dialogue.

~ Yogi
Message 18 of 27
Anonymous
in reply to: smorris

I know that you can show the layer dialog box. I was thinking about
manipulating them without the dialog.
I don't know of a way to produce DWFx silently with the API. The workaround
is to make an external application that sends keystrokes to the plot dialog
box.

--
Jimmy Bergmark
JTB World - Software development and consulting
Owner/Developer
http://www.jtbworld.com
http://jtbworld.blogspot.com

JTB World offers you software's, custom software development, consulting...
http://www.jtbworld.com/about.htm

JTB FlexReport (FLEXnet / FLEXlm license report tool) -
www.jtbworld.com/jtbflexreport

AutoCAD 2008
http://www.jtbworld.com/autocad2008.htm

"Yogi189" wrote in message news:5711323@discussion.autodesk.com...
Hi Jimmy,

Thanks for your quick reply.

Actually there is API to popup Layer manager dialogue of activex control and
save updated visibility status as DWF file.

But what I need is DWFx.
I had tried to set PC3 file too, but not help....:(

TrueView utility supports DWG to be expose as DWFx using PLOT option.

I want same thing to be done with TrueView activex without plot dialogue.

~ Yogi
Message 19 of 27
Yogi189
in reply to: smorris

Dear Kulak,

Thanks for great post.
I tried to use this activex control in my .Net application. It works fine when I install DWGTrueView.

DWGTruew Activex DLL (AcCtrl.dll) is not working standalone. Even I have added depending DLL’s and successfully registered it as COM.

When I tried to call the API PutSourcePath(…) it throws an exception “Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”

Do you have any idea why this exception was thrown. Any work around for it?

Thanks in advance.

Regards,
Yogesh Jain
Message 20 of 27
Anonymous
in reply to: smorris

AcCtrl.dll does not work standalone.

--
Jimmy Bergmark
JTB World - Software development and consulting
Owner/Developer
http://www.jtbworld.com
http://jtbworld.blogspot.com

JTB World offers you software's, custom software development, consulting...
http://www.jtbworld.com/about.htm

JTB FlexReport (FLEXnet / FLEXlm license report tool) -
www.jtbworld.com/jtbflexreport

AutoCAD 2008
http://www.jtbworld.com/autocad2008.htm

"Yogi189" wrote in message news:5730379@discussion.autodesk.com...
> Dear Kulak,
>
> Thanks for great post.
> I tried to use this activex control in my .Net application. It works fine
> when I install DWGTrueView.
>
> DWGTruew Activex DLL (AcCtrl.dll) is not working standalone. Even I have
> added depending DLL’s and successfully registered it as COM.
>
> When I tried to call the API PutSourcePath(…) it throws an exception
> “Attempted to read or write protected memory. This is often an indication
> that other memory is corrupt.”
>
> Do you have any idea why this exception was thrown. Any work around for
> it?
>
> Thanks in advance.
>
> Regards,
> Yogesh Jain

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report