Support on o2c files (Objects 2 See) and o2c Interactive!
#52270 by showphone
Wed Feb 23, 2011 4:47 pm
None of the suggestions for successfully using the Firefox 02c plugin worked, so I contacted Dr. Klaus Kremer at o2c. He sent me the following html code and it works great for both Firefox and IE. His code is red, I spliced in the rest of the code to get notification of the controls I wanted:

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<BODY
BGCOLOR="#000000" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#0F0000">
<div align="center">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" width="100%" height="100%">
<tr>
<td width="100%" align="center" height="100%">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<font face="Verdana, Arial" size="1" color="#FFFFFF">Shift+left button for Pan,
Ctrl+left button for Zoom, Right Click for settings.</font><br><br>
<script type="text/javascript"
src="http://www.o2c.de/utilities/o2c-utils.js"></script>
<script type="text/javascript">
o2cInsertObject('o2c_id1', '2.0.0.57', 640, 480,
'Phi="227.864700"; ' +
'Psi="39.359985"; ' +
'Zoom="0.903993"; ' +
'PanX="-0.224418"; ' +
'PanY="1.685330"; ' +
'ObjectURL="cubeSmith.o2c"');
</script>
</body></html>


Change the ObjectURL to your Object of course and to your location if not in the same folder.

He gave me a good tip on getting the desired opening appearance of your Object. Play your object by clicking on it's o2c file. Adjust it too how you want it with the spin, pan and zoom controls. Right click it and you will see that particular html is copied to the clipboard. Copy and paste the generated Phi, Psi, Zoom, and Pan information into your html code. Now that position will be the o2c Object starting position.

Long live o2c and DataCAD.
#52272 by Mark F. Madura
Wed Feb 23, 2011 6:03 pm
Here is the minimum code required to embed an o2c object in your web page:
Code: Select all<script type="text/javascript" src="http://www.o2c.de/utilities/o2c-utils.js"></script>
<script type="text/javascript">
    o2cInsertObject('o2c_id1', '1.9.9.135', 640, 480, 'ObjectURL="MyObject.o2c"');
</script>

Note: Setting the version number to 1.9.9.135 establishes the minimum player version the user has to have installed in order to view your object. If they are viewing the object in Internet Explorer using the o2c Player that ships with DataCAD (1.9.9.149 with raytracing), you do not want to prompt them to install a newer version. For other browsers including Firefox and Chrome, they will be prompted anyway.

Edit:

You can also specify the width and height in percent as a string. For example ...
Code: Select all<script type="text/javascript" src="http://www.o2c.de/utilities/o2c-utils.js"></script>
<script type="text/javascript">
    o2cInsertObject('o2c_id1', '1.9.9.135', '100%', '100%', 'ObjectURL="MyObject.o2c"');
</script>
#52273 by showphone
Wed Feb 23, 2011 6:43 pm
Hi Mark,

Using this forum as email to get answers distributed.

What I REALLY like about o2c is that it can be an ActiveX control, so whoever you're presenting to doesn't have to be a DataCAD user or even download the o2c Player. For such a person, when they are prompted to accept the ActiveX or install the plugin, will they therefore get the latest version or could you make sure they get the DataCAD version by putting that version in your code? Because I'd be happy to use a version other than the latest version if it worked better with DataCAD. Thanks.
#52281 by joshhuggins
Fri Feb 25, 2011 12:24 pm
Using the Javascript method seems to not download the file to the users temp files either which is nice if you don't want the user to have access to the file. Is there a way to disable the Right Click, Save Object option? I tried searching for a tag in the Arcon forums but I couldn't get a good translation going.
#52284 by Mark F. Madura
Fri Feb 25, 2011 1:38 pm
joshhuggins wrote:Is there a way to disable the Right Click, Save Object option? I tried searching for a tag in the Arcon forums but I couldn't get a good translation going.
LocalSaveAllowed
<PARAM NAME="LocalSaveAllowed" VALUE="-1">
Allows local saving of the downloaded object and its textures
Object will be saved as a non-compressed ACO file
Texture will be saved in BMP format

See http://www.datacad.com/o2c/o2c_for_programmers.htm

MFM
#52291 by showphone
Fri Feb 25, 2011 5:37 pm
In order to test if the DataCAD version with ray tracing would be used if that particular version of the o2c player was referenced in the html, I changed the html to that particular version (1.9.9.149), uninstalled the o2c plugin (2.0.0.56) from Firefox and accessed the revised html. Firefox installed the newer plugin.

So it seems to me that there's no way to use Firefox with the older version of the plugin, therefore ray tracing in Firefox is not possible. Does anybody else see it differently? Thanks.
#52293 by showphone
Fri Feb 25, 2011 5:51 pm
Ok, so I think I should put some directions in my html along with my control directions about pan and zoom that says "note, light and shadow effects can only be viewed using IE". Would that be a good way to go?

Who is online

Users browsing this forum: No registered users and 1 guest

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.

DataCAD

Software for AEC Professionals Since 1984