CATIA V4 and CATPart to VRML Converter

A CATPart to VRML Batchconverter:

The next example uses the \"CATIA V5 Interfaces Object Library\" to
connect to CATIA V5, open a CATPart and export it to VRML. You can do
that with other formats like IGES, STEP, … too (if you have the
licence).

You need Python and Pywin for this example and have also running CATIA V5:

# Demo for converting a CATPart to VRML
# Please start CATIA V5 before running this script

from win32com.client.dynamic import Dispatch
catapp = Dispatch("CATIA.Application")
catapp.Documents.Open("D:\work\Testmodell.CATPart")
catapp.ActiveDocument.ExportData('D:\work\Testmodell.wrl', 'wrl')

A CATIA V4 model to VRML Batchconverter:

You can`t do this interactive in CATIA V5 but with Python. Simply
open a CATIA V4 model and export it to VRML (I did this with R14):

# Demo for converting a CATIA V4 model to VRML
# Please start CATIA V5 before running this script
# Demo for converting a CATIA V4 model to VRML
# Please start CATIA V5 before running this script
from win32com.client.dynamic import Dispatch
catapp = Dispatch("CATIA.Application")
catapp.Documents.Open("D:\work\Testmodell.model")
catapp.ActiveDocument.ExportData('D:\work\Testmodell.wrl', 'wrl')

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.