Announcement

Collapse
No announcement yet.

Problem reading inventor files using Mercury

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem reading inventor files using Mercury

    Hi all,

    I have a peculiar problem:
    I am writing an application that is to read in an inventor (iv) file into network, modify some field values and render the resultant scenegraph to a user-provided window-handle.

    The iv-file was developed by a colleague at another location (the colleague's organization-unit currently does not use Mercury Open Inventor).

    The problem is - my application does use Mercury's inventor implementation.
    I see the following error-messages:

    Inventor warning in SoBase::createInstance();
    Creating unknown node for object of type
    <Some-node-that-I-cannot-name> (could not open DSO)


    Repeats a bunch of times with different <node-names>..

    followed by..

    Inventor read error: Expected '{'; got 't'
    Occurred at line 61 in C:\Program


    Repeats a bunch of times (with different line numbers and 'expected-values')

    So, my question is what can I do to ensure that my application can successfully read-in the iv-file?

    Thanks!
    The Shiv

  • #2
    Custom nodes in .iv file

    You said:
    "I am writing an application that is to read in an inventor (iv) file into network, modify some field values and render the resultant scenegraph to a user-provided window-handle."

    The error message you got means that the .iv file contains one or more custom nodes (nodes that are not standard Inventor classes). So you have a bigger problem than just reading the file. Inventor, by itself, won't know how to render those nodes (even if it could read them) and if it ignores those nodes then the resulting image will be at least incomplete/wrong. There are several ways to handle this:
    • The file creator can build the custom node(s) as a separate DLL/DSO and send that to you. Inventor will automatically load the DLL/DSO. Of course that won't work if you're using different flavors of Inventor.
    • The file creator can generate the .iv file without the custom node(s), possibly replacing the custom node(s) with standard Inventor nodes. Of course this is only an approximate solution.
    • The file creator can send you the source code for the custom node(s). If your application incorporates this code and calls initClass() for the custom node(s), it should be able to read the file and display it correctly. This seems like the best option.


    Regards,
    Mike

    Comment

    Working...
    X