WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   File Path 4 Object Load (https://forum.worldviz.com/showthread.php?t=421)

softscan2 09-22-2005 09:55 PM

File Path 4 Object Load
 
I know this is very basic but how do you load an object from a dirctory remote to Vizard's installation.
I did scan help and tutorials
I tried
whirlpool = viz.add(c:\code&game\corevrml\mywhirlpool_2.wrl')
and got
ERROR failed to load...................

farshizzo 09-23-2005 08:59 AM

Hi,

Backslash characters are a special case in strings. For instance, when you want to instert a newline or a tab in a string you would use \n and \t, respectively. If you want to insert an actual backslash character you would have to use to backslashes, \\.

Alternatively you could use forward slashes or mark the string as raw by placing an r character before the string:
Code:

viz.add(r'c:\code&game\corevrml\mywhirlpool_2.wrl')


All times are GMT -7. The time now is 09:43 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC