Arbortext IsoView > Programmer's Reference > General Functions
  
General Functions
OpenFile
* 
This method is deprecated and supported for backward compatibility only. Use Iso3Openfile instead. (See Iso3OpenFile.)
The OpenFile method opens an illustration and sets the specified viewport (View). The first call to OpenFile defines the Home view. From then on you can return to this initial view by clicking the Home button. (See Toolbar.)
To set a new viewport in the current open illustration use an empty string "" as a FileName.
Introduced with Arbortext IsoView 1.0.
Syntax
OpenFilelpszFileNamelpszView
Parameters:
lpszFileName
This parameter defines the file name or URL of the illustration to be opened as BSTR.
lpszView
This parameter defines the name of the view (ViewPort) as BSTR. Arbortext IsoView can generate viewports dynamically for a given object.
Return value: BOOL.
In all places where a string for a viewport is used you can also use the following:
$OBJ_ObjectNameor$NAME_ObjectName
Where $OBJ_ or $NAME_ precedes the name of the object you want to show and ObjectName is the object’s name. For example, if the name of the object is HS1 the string would be $OBJ_HS1 or $NAME_HS
$ID_ObjectID
Where $ID_ precedes the ID of the object you want to show and ObjectID is the object’s ID. For example, if the name of the object is 2006 the string would be $ID_2006.
$EXTENT
Use this name to instruct Arbortext IsoView to build a viewport that fits around the extent of the file. You can use the OpenFile command to only change the viewport. In this case pass an empty string for the filename.
The following command opens a URL as viewport View1:
document.ivx1.OpenFile("http://www.ptc.com/demo/test.iso", "View1");