Initial Commit of the PDM project (ready for DWS migration)
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
<html xmlns:mshelp="http://msdn.microsoft.com/mshelp">
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<meta content="history" name="save">
|
||||
<meta content="Innovasys Document! X (http://www.innovasys.com)" name="GENERATOR">
|
||||
<title>Rename Method (IEdmBomView4)</title>
|
||||
<link href="stylesheets/dotnet2005.css" type="text/css" rel="stylesheet">
|
||||
<script src="script/dotnet2005.js" type="text/javascript">
|
||||
</script><xml>
|
||||
<MSHelp:Keyword Index="F" Term="EPDM.Interop.epdm.IEdmBomView4.Rename" />
|
||||
<MSHelp:Attr Name="DevLang" Value="CSharp" />
|
||||
<MSHelp:Attr Name="DevLang" Value="VB" />
|
||||
<MSHelp:Attr Name="DevLang" Value="JScript" />
|
||||
<MSHelp:Attr Name="TopicType" Value="kbSyntax"/>
|
||||
<MSHelp:Attr Name="LinkGroup" Value="Help"/>
|
||||
<MSHelp:Attr Name="Locale" Value="kbEnglish"/>
|
||||
<MSHelp:Attr Name="HelpPriority" Value="1"/>
|
||||
</xml>
|
||||
|
||||
|
||||
<script src="script/hs-expandcollapse.js" type="text/javascript"></script>
|
||||
<script src="script/hs-enlargeimage.js" type="text/javascript"></script>
|
||||
<script src="script/swfobject.js" type="text/javascript"></script>
|
||||
<script src="script/hs-common.js" type="text/javascript"></script>
|
||||
<script src="script/hs-heading-expandcollapse.js" type="text/javascript"></script>
|
||||
<script src="script/hs-tabstrip.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body id="dxBody" topmargin="0">
|
||||
<form>
|
||||
<input class="userDataStyle" id="userDataCache" type="hidden" name="userDataCache"> <input id="hiddenScrollOffset" type="hidden" name=
|
||||
"hiddenScrollOffset"> <img id="collapseImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/collapse.gif"> <img id="expandImage"
|
||||
style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/expand.gif"> <img id="collapseAllImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px"
|
||||
src="dotnetimages/collapse.gif"> <img id="expandAllImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/expand.gif"> <img id=
|
||||
"dropDownImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/drpdown.gif"> <img id="dropDownHoverImage" style=
|
||||
"DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/drpdown_orange.gif"> <img id="copyImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src=
|
||||
"dotnetimages/copycode.gif"> <img id="copyHoverImage" style="DISPLAY: none; WIDTH: 0px; HEIGHT: 0px" src="dotnetimages/copycodeHighlight.gif">
|
||||
|
||||
</form>
|
||||
|
||||
<div id="pagetop">
|
||||
|
||||
|
||||
<table id="pagetoptable1" width="100%">
|
||||
<tbody>
|
||||
<tr id="pagetoptable1row1">
|
||||
<td align="left"><span id="projecttitle">SOLIDWORKS PDM Professional API Help</span></td>
|
||||
|
||||
<td align="right"><span id="feedbacklink"><a href="mailto:apihelp.feedback@3ds.com?subject=Documentation Feedback: EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmBomView4~Rename.html">Send Feedback</a></span></td>
|
||||
</tr>
|
||||
|
||||
<tr id="pagetoptable1row2">
|
||||
<td align="left" colspan="2"><span id="pagetitle">Rename Method (IEdmBomView4)</span></td>
|
||||
</tr>
|
||||
|
||||
<tr id="pagetoptable1row3">
|
||||
<td colspan="2"><a onclick="javascript:openSectionById('seeAlsoSectionHeader');" href="#seealsobookmark">
|
||||
See Also</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="pagetoptable2" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span id="toggleExpandedAll"><img class="toggleAll" id="toggleExpandedAllImage" src="dotnetimages/collapse.gif"> <label id=
|
||||
"collapseAllLabel" style="DISPLAY: none" for="toggleExpandedAllImage">Collapse All</label> <label id="expandAllLabel" style="DISPLAY: none" for="toggleExpandedAllImage">
|
||||
Expand All</label></span> <span id="languageFilterToolTip"
|
||||
onmouseover='document.getElementById("languageFilterImage").src=document.getElementById("dropDownHoverImage").src;' style="CURSOR: default"
|
||||
onfocusout='document.getElementById("languageFilterImage").src=document.getElementById("dropDownImage").src;' onclick=
|
||||
"showBox('dxlanguagemenu',event,document.getElementById('languageFilterImage'))" onfocusin=
|
||||
'document.getElementById("languageFilterImage").src=document.getElementById("dropDownHoverImage").src;' onmouseout=
|
||||
'document.getElementById("languageFilterImage").src=document.getElementById("dropDownImage").src;'><img id="languageFilterImage" src=
|
||||
"dotnetimages/drpdown.gif"> <label id="showAllLabel" style="DISPLAY: none" for="languageFilterImage">
|
||||
Language Filter: All</label> <label id="multipleLabel" style=
|
||||
"DISPLAY: none" for="languageFilterImage">Language Filter: Multiple</label>
|
||||
|
||||
<label id="VBLabel" for="languageFilterImage" style="display: none;">Language Filter: Visual Basic</label>
|
||||
<label id="CSLabel" for="languageFilterImage" style="display: none;">Language Filter: C#</label>
|
||||
<label id="CPP2005Label" for="languageFilterImage" style="display: none;">Language Filter: C++/CLI</label>
|
||||
</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><table width="100%" id="pagetopbreadcrumbs" cellspacing="0" cellpadding="0"><tr><td>
|
||||
<a href="EPDM.Interop.epdm~EPDM.Interop.epdm_namespace.html">EPDM.Interop.epdm Namespace</a>
|
||||
> <a href="EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmBomView4.html">IEdmBomView4 Interface</a>
|
||||
: Rename Method (IEdmBomView4)</td></tr></table>
|
||||
|
||||
<div class="dxpopupbubble" id="dxlanguagemenu">
|
||||
|
||||
<input id="VBCheckbox" type="checkbox" name="languageFilter" onClick="setLanguage(this)" />
|
||||
<label class="languageFilter" for="VBCheckbox">
|
||||
Visual Basic
|
||||
</label>
|
||||
<br /><input id="CSCheckbox" type="checkbox" name="languageFilter" onClick="setLanguage(this)" />
|
||||
<label class="languageFilter" for="CSCheckbox">
|
||||
C#
|
||||
</label>
|
||||
<br /><input id="CPP2005Checkbox" type="checkbox" name="languageFilter" onClick="setLanguage(this)" />
|
||||
<label class="languageFilter" for="CPP2005Checkbox">
|
||||
C++/CLI
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div id="bsFileName_box" class="dxpopupbubble">
|
||||
<DL><DT class="popupbubble"><I>bsFileName</I></DT>
|
||||
<DD class="popupbubble">New file name of named BOM</DD></DL>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="pagebody" valign="bottom">
|
||||
<a name="topBookmark"></a>
|
||||
|
||||
<div id="mainbody">
|
||||
<div class="saveHistory" id="allHistory" onsave="saveAll()" onload="loadAll()"></div>
|
||||
Renames this named BOM.
|
||||
|
||||
|
||||
<h1 class="heading"><span class="expandcollapse" tabindex="0"><img id="syntaxToggle" class="toggle" name="toggleSwitch" src="dotnetimages/collapse.gif"></img>Syntax</span></h1><div id="syntaxSection" class="section" name="collapseableSection"><DIV class=LanguageSpecific id=Syntax_VB><table class="syntaxtable" width="100%" cellpadding="0" cellspacing="0"><tr><th>Visual Basic</th><th> </th></tr><tr><td colspan="2"><pre>Sub Rename( _
|
||||
ByVal <i><a class="parameter" id="bsFileName" href="#" onclick="javascript:showParamBox(event);">bsFileName</a></i> As System.String _
|
||||
) </pre></tr></table></div>
|
||||
<DIV class=LanguageSpecific id=Syntax_CS><table class="syntaxtable" width="100%" cellpadding="0" cellspacing="0"><tr><th>C#</th><th> </th></tr><tr><td colspan="2"><pre>void Rename(
|
||||
System.string <i><a class="parameter" id="bsFileName" href="#" onclick="javascript:showParamBox(event);">bsFileName</a></i>
|
||||
)</pre></tr></table></div>
|
||||
<DIV class=LanguageSpecific id=Syntax_CPP2005><table class="syntaxtable" width="100%" cellpadding="0" cellspacing="0"><tr><th>C++/CLI</th><th> </th></tr><tr><td colspan="2"><pre>void Rename(
|
||||
& System.String^ <i><a class="parameter" id="bsFileName" href="#" onclick="javascript:showParamBox(event);">bsFileName</a></i>
|
||||
) </pre></tr></table></div>
|
||||
|
||||
<h4 class=dxh4>Parameters</h4><DL><DT><I>bsFileName</I></DT>
|
||||
<DD>New file name of named BOM</DD></DL>
|
||||
|
||||
</div>
|
||||
|
||||
<a name="exampleBookmark"></a>
|
||||
<h1 class="heading"><span class="expandcollapse" tabindex="0"><img id="exampleToggle" class="toggle" name="toggleSwitch" src="dotnetimages/collapse.gif"></img>Example</span></h1><div id="exampleSection" class="section" name="collapseableSection"><P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//Preconditions:</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//1. Create a C# console application in Visual Studio.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//2. Add references EPDM.Interop.epdm and EPDM.Interop.EPDMResultCode to the project.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//3. Copy the code below to Program.cs.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//4. Change the namespace to match your project name.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//5. Add an assembly with a named BOM to your vault.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//6. Ensure that parameters of Login, and GetFileFromPath match your vault.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//7. Modify the Rename method’s parameter to rename your assembly’s named BOM.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//Postconditions: </P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//1. Refresh your vault view.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//2. Select the assembly with the named BOM in the vault.</P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//3. Observe the renamed BOM in the BOM dropdown on the Bill of Materials tab.<BR></P>
|
||||
<P class=auto-style1 style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"> </P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none">//Program.cs:</P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>using</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> System;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>using</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> EPDM.Interop.epdm;<BR></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>using</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> EPDM.Interop.EPDMResultCode;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>using</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> System.Windows.Forms;<BR></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>namespace</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> project_name</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>class</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #2b91af'>Program</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>static</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> IEdmVault5 vault1 = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>null</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>static</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> IEdmFile7 aFile;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>static</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>string</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> userName = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"Admin"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>static</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>void</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> Main(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>string</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>[] args)</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>try</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>vault1 = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>new</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> EdmVault5();</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>if</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> (!vault1.<STRONG>IsLoggedIn</STRONG>)</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>vault1.<STRONG>Login</STRONG>(userName, </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"password"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>, </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"JEB12"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>IEdmVault7 vault7 = (IEdmVault7)vault1;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>IEdmFolder5 ppoRetParentFolder;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>aFile = (IEdmFile7)vault1.<STRONG>GetFileFromPath</STRONG>(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"C:\\Users\\J4M\\Desktop\\JEB12\\test3.sldasm"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>, </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>out</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> ppoRetParentFolder);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>EdmBomInfo[] derivedBOMs = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>null</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>aFile.<STRONG>GetDerivedBOMs</STRONG>(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>out</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> derivedBOMs);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>int</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> bomId = derivedBOMs[0].<STRONG>mlBomID</STRONG>;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>IEdmBom bom = (IEdmBom)vault7.<STRONG>GetObject</STRONG>(EdmObjectType.EdmObject_BOM, bomId);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>EdmBomVersion[] ppoVersions = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>null</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>;</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>bom.<STRONG>GetVersions</STRONG>(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>out</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> ppoVersions);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>IEdmBomView4 bomView = (IEdmBomView4)bom.<STRONG>GetView</STRONG>(ppoVersions[ppoVersions.Length - 1].<STRONG>mlVersion</STRONG>);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>bomView.<STRONG>Rename</STRONG>(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"test3_renamed.sldasm.1.BOM"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>Console.WriteLine(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"BOM successfully renamed"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>Console.WriteLine(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"Press any key to exit"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>Console.ReadKey();</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>catch</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> (System.Runtime.InteropServices.COMException ex)</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>var</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> errorType = </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>typeof</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>(EdmResultErrorCodes_e);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>if</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> (Enum.IsDefined(errorType, ex.ErrorCode))</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>MessageBox.Show(String.Format(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"Error occurred: {0}"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>, Enum.GetName(errorType, ex.ErrorCode)));</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>else</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'></SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>MessageBox.Show(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"HRESULT = 0x"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> + ex.ErrorCode.ToString(</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>"X"</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'>) + </SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: #a31515'>" "</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> + ex.Message);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: blue'>catch</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'> (Exception ex)</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>{</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>MessageBox.Show(ex.Message);</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></P>
|
||||
<P class=MsoNormal style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black'><SPAN style="mso-spacerun: yes"> </SPAN>}</SPAN></P>
|
||||
<P class=MsoNormal><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; COLOR: black; LINE-HEIGHT: 107%'>}</SPAN><SPAN style='FONT-SIZE: 10pt; FONT-FAMILY: "Courier New"; LINE-HEIGHT: 107%'></SPAN></P>
|
||||
<P class=auto-style2 style="TEXT-AUTOSPACE: ; mso-layout-grid-align: none"> </P>
|
||||
</div>
|
||||
|
||||
<h1 class="heading"><span class="expandcollapse" tabindex="0"><img id="remarksToggle" class="toggle" name="toggleSwitch" src="dotnetimages/collapse.gif"></img>Remarks</span></h1><div id="remarksSection" class="section" name="collapseableSection"><P>Named BOMs are saved as:</P>
|
||||
<P> <EM>file_name</EM>.sld<EM>ext</EM>.<EM>version</EM>.BOM</P>
|
||||
<P>Be sure to use the correct format when specifying bsFileName. For example, if you get <STRONG>assembly.sldasm</STRONG>, then to rename its BOM set bsFileName to:</P>
|
||||
<P> assembly_renamed.sldasm.1.BOM</P></div>
|
||||
<a name="seealsobookmark"></a>
|
||||
<h1 class="heading"><span class="expandcollapse" tabindex="0"><img id="seealsoToggle" class="toggle" name="toggleSwitch" src="dotnetimages/collapse.gif"></img>See Also</span></h1><div id="seealsoSection" class="section" name="collapseableSection"><h4 class="dxh4"></h4><a href="EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmBomView4.html">IEdmBomView4 Interface</a>
|
||||
<br/><a href="EPDM.Interop.epdm~EPDM.Interop.epdm.IEdmBomView4_members.html">IEdmBomView4 Members</a>
|
||||
</p>
|
||||
</div>
|
||||
<h1 class="heading"><span class="expandcollapse" tabindex="0"><img id="availabilityToggle" class="toggle" name="toggleSwitch" src="dotnetimages/collapse.gif"></img>Availability</span></h1><div id="availabilitySection" class="section" name="collapseableSection">SOLIDWORKS PDM Professional 2022</div>
|
||||
</div>
|
||||
|
||||
<div id="pagefooter"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user