<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic Variable Transfer in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924118#M141352</link>
    <description>&lt;P&gt;The pipe sizes can be ANY normal pipe size.&lt;/P&gt;&lt;P&gt;However, I found another workaround. You CAN use your Replacer to swap out the pipes by calling it in as the Content Center built in length. Then change the length parameter of the pipe to make it the correct length. After that you can use MakePath to rename it to the correct name with the new length.&lt;/P&gt;&lt;P&gt;In this case, it will take only four lines of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;﻿﻿﻿replacer.Replace(pPartName, PfamilyName, pNewName)&lt;BR /&gt;pNewPartName = pNewName &amp;amp; ":1"&lt;BR /&gt;Parameter(pNewPartName, "PL") = OldPlength&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only show three here because I haven't done the MakePath yet.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Feb 2011 18:57:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-02-21T18:57:35Z</dc:date>
    <item>
      <title>iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2919066#M141339</link>
      <description>&lt;P&gt;I have a rule which contains the Main and three Subs. I need to transfer variables between Subs. Normal VB doesn't seem to work. It doesn't error out. It just doesn't do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I call a Sub from Main :&lt;/P&gt;&lt;P&gt;﻿SwapPipe (oCompOcc, CurrentSize, NozzleSize)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Sub beginning looks like :&lt;/P&gt;&lt;P&gt;Sub SwapPipe(compOcc as Inventor.ComponentOccurrence, CurrentSize As String, NozzleSize As String)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then that Sub calls another Sub as:&lt;/P&gt;&lt;P&gt;InitialSize(compOcc, CurrentSize)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that Sub beginning looks like:&lt;/P&gt;&lt;P&gt;Sub InitialSize(ScompOcc as Inventor.ComponentOccurrence, CurrentSize As String)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, as an example, I would think that the variable CurrentSize would transfer between all these. But it isn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2011 20:39:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2919066#M141339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-16T20:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921584#M141340</link>
      <description>&lt;P&gt;That should work. &amp;nbsp;What version of Inventor are you using?&lt;/P&gt;
&lt;P&gt;You can try adding the line:&lt;/P&gt;
&lt;P&gt;Option Explicit On&lt;/P&gt;
&lt;P&gt;and maybe&lt;/P&gt;
&lt;P&gt;Option Strict On&lt;/P&gt;
&lt;P&gt;to the top of your rule. &amp;nbsp;That might give you some compiler error messages about undeclared variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 14:58:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921584#M141340</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-18T14:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921758#M141341</link>
      <description>&lt;P&gt;Inventor 2011 64bit.&lt;/P&gt;&lt;P&gt;OS = Windows 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree it &lt;STRONG&gt;should&lt;/STRONG&gt; work but there are lots of things I've found in iLogic that you can do in Dot Net but not in iLogic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But variable transfer is simple and I just can't understand why it won't do it.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 16:02:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921758#M141341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-18T16:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921822#M141342</link>
      <description>&lt;P&gt;I added Option Explicit On, but didn't get anything useful returned.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 16:26:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2921822#M141342</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-18T16:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922058#M141343</link>
      <description>&lt;P&gt;Can you post the complete rule?&amp;nbsp; That would help me to figure out what's going on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:45:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922058#M141343</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-18T18:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922072#M141344</link>
      <description>&lt;P&gt;I can but I think I may have found a way around it. I'm now trying to eliminate the subs, condense down the code, and just put it all in the main.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:54:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922072#M141344</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-18T18:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922078#M141345</link>
      <description>&lt;P&gt;I do have another question. Are you the one that wrote the external rule for the Content Center replacer for iLogic?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:57:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922078#M141345</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-18T18:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922086#M141346</link>
      <description>&lt;P&gt;Yes, I can take credit or blame for that code.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 19:07:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922086#M141346</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-18T19:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922090#M141347</link>
      <description>&lt;P&gt;Ok, good. I'm using it in my current program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I have a 150# nozzle which consists of a 150# flange and a pipe. Both are Content Center parts. I can swap the flange out without issue but I'm having difficulty with the pipe. How do I put that in the replacer command so that Content Center knows to ONLY replace the size and leave the schedule and length alone?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, secondary to that, how do I&amp;nbsp; put that in the replacer command so that I can change any of those?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 19:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2922090#M141347</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-18T19:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2923778#M141348</link>
      <description>&lt;P&gt;Any news on this?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 15:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2923778#M141348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-21T15:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924062#M141349</link>
      <description>&lt;P&gt;You're placing the pipes as Custom parts, right?&amp;nbsp; That way you can specify any length you want.&amp;nbsp; The content center replacement function code will only work on Standard parts.&amp;nbsp; I'll see if if can be modified to work on Custom parts as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Note that you can replace Custom parts using the&amp;nbsp;iLogic Component.Replace function.&amp;nbsp; But to use that, you must first generate the exact part you need from the content center.&amp;nbsp; The part must be available in your workspace or local library so that Component.Replace can find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 18:07:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924062#M141349</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-21T18:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924070#M141350</link>
      <description>&lt;P&gt;So, if I'm understanding you, the part has to be placed first then the length parameter adjusted to what it needs to be....correct?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 18:10:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924070#M141350</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-21T18:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924104#M141351</link>
      <description>&lt;P&gt;If you are placing the pipe as a Custom part, then the ContentCenterReplace code will not work.&amp;nbsp; I am looking at changing it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as a workaround, you can use Component.Replace.&amp;nbsp; To make that work, first place the pipe in one size and length that you require.&amp;nbsp; Then (maybe in a temporary assembly in the same folder), place other sizes and lengths that you need.&amp;nbsp; Now that you've placed them, the part files&amp;nbsp;are available to be used by Component.Replace.&amp;nbsp; I don't know if you will find this workaround to be useful.&amp;nbsp; How many different sizes and lengths of a particular pipe component do you require in your design?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 18:44:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924104#M141351</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-21T18:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924118#M141352</link>
      <description>&lt;P&gt;The pipe sizes can be ANY normal pipe size.&lt;/P&gt;&lt;P&gt;However, I found another workaround. You CAN use your Replacer to swap out the pipes by calling it in as the Content Center built in length. Then change the length parameter of the pipe to make it the correct length. After that you can use MakePath to rename it to the correct name with the new length.&lt;/P&gt;&lt;P&gt;In this case, it will take only four lines of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;﻿﻿﻿replacer.Replace(pPartName, PfamilyName, pNewName)&lt;BR /&gt;pNewPartName = pNewName &amp;amp; ":1"&lt;BR /&gt;Parameter(pNewPartName, "PL") = OldPlength&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only show three here because I haven't done the MakePath yet.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 18:57:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924118#M141352</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-21T18:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924250#M141353</link>
      <description>&lt;P&gt;I take that back. You can't rename a part with MakePath.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2011 20:48:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2924250#M141353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-21T20:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925888#M141354</link>
      <description>&lt;P&gt;Hey Mike, here is another question. Our Content Center is custom and has a custom name. Today I put our custom Content Center on my machine and turned all others off. Now Replacer can't find things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is Replacer specific to out-of-the-box Content Center and not able to see our custom one?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2011 20:27:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925888#M141354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-22T20:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925898#M141355</link>
      <description>&lt;P&gt;I think I may have found the problem with the custom Content Center so disregard that last question. The problem was with my code........imagine that&amp;nbsp; &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2011 20:34:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925898#M141355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-22T20:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925930#M141356</link>
      <description>&lt;P&gt;Ok, I fixed my code. But, yesterday when it swapped out the pipes I could still go in and adjust the length using the "Parameter" command on the newly inserted pipe and make it the correct length. Today I can't. Yesterday it changed the diameter in the name but not the length. Today, with the custom Content Center, it isn't changing either one, even though the parameter name is still the same from yesterday to today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm fairly baffled at the moment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2011 21:09:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2925930#M141356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-22T21:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2927192#M141357</link>
      <description>&lt;P&gt;Using a rule to change the length after replacing the part probably isn't equivalent to selecting a different part and custom length in the Content Center UI.&amp;nbsp; I'm going to see if I can improve the rule function to accept a custom length or other parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;But I can also look at the method you're using.&amp;nbsp; Can you post the rule you're using?&amp;nbsp; I should be able to create a test assembky to try it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 17:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2927192#M141357</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-02-23T17:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Variable Transfer</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2927266#M141358</link>
      <description>&lt;P&gt;﻿AddReference "NozzleAdjuster1"&lt;BR /&gt;&lt;BR /&gt;Sub Main&lt;BR /&gt;AddVbFile ("ContentCenterReplace.iLogicVb")&lt;BR /&gt;Dim app As Inventor.Application = ThisApplication&lt;BR /&gt;Dim oDoc As Inventor.AssemblyDocument = app.ActiveDocument&lt;BR /&gt;Dim oCompDef As Inventor.ComponentDefinition = oDoc.ComponentDefinition&lt;BR /&gt;Dim oCompOcc As Inventor.ComponentOccurrence&lt;BR /&gt;&lt;BR /&gt;For Each oCompOcc In oCompDef.Occurrences&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim compDef as Inventor.ComponentDefinition = oCompOcc.Definition&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim compDoc as Inventor.Document = compDef.Document&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim PartName As String = System.IO.Path.GetFileNameWithoutExtension(compDoc.FullFileName)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;IsPipe = Left(PartName, 4)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If IsPipe = "Pipe" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;CurrentSize = Mid(PartName, 6, 2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;SizeChk = Mid(CurrentSize, 2, 1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewNameLength = PartName.Length&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewNameRemainL = pNewNameLength - 7&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewNameRemain = Mid(PartName, 8, pNewNameRemainL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pPartName = PartName &amp;amp; ":1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;OldPlength = Parameter(pPartName, "PL")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PipeWall = Parameter(pPartName, "t")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;PipeFlangeOffset = Parameter(oDoc, "d0")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;CurrentNozzleProjection = Parameter(oDoc, "d4")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If SizeChk = "" Or SizeChk = " " Or SizeChk = nil Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;CurrentSize = Mid(PartName, 6, 1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewNameRemainL = pNewNameLength - 6&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewNameRemain = Mid(PartName, 7, pNewNameRemainL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewName = IsPipe &amp;amp; CurrentSize &amp;amp; pNewNameRemain&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;Dim dlg as New ClassLibrary1.Dialog1&lt;BR /&gt;dlg.NozzleSize = NozzleSize&lt;BR /&gt;dlg.CurrentSize = CurrentSize&lt;BR /&gt;dlg.PipeWall = PipeWall&lt;BR /&gt;dlg.PipeFlangeOffset = PipeFlangeOffset&lt;BR /&gt;dlg.CurrentNozzleProjection = CurrentNozzleProjection&lt;BR /&gt;dlg.NewNozzleProjection = NewNozzleProjection&lt;BR /&gt;i = dlg.ShowDialog()&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;For Each oCompOcc In oCompDef.Occurrences&lt;BR /&gt;&lt;BR /&gt;Dim compDef as Inventor.ComponentDefinition = oCompOcc.Definition&lt;BR /&gt;Dim compDoc as Inventor.Document = compDef.Document&lt;BR /&gt;Dim PartName As String = System.IO.Path.GetFileNameWithoutExtension(compDoc.FullFileName)&lt;BR /&gt;Dim replacer As New ContentCenterReplace(ThisDoc.Document, ThisApplication, "en-US")&lt;BR /&gt;Dim PfamilyName As String = "Tube &amp;amp; Pipe:Conduits:Pipes:ASTM A 53/A 53M Pipe"&lt;BR /&gt;pCCFam = "ASTM A 53/A 53M "&lt;BR /&gt;Dim FfamilyName As String = "Tube &amp;amp; Pipe:Fittings:Flanges:ASME B16.5 Flange Slip-On Welding - Class 150"&lt;BR /&gt;&lt;BR /&gt;If IsFlange &amp;lt;&amp;gt; "ASME B16.5 Flange Slip-On Welding - Class 150" Then&lt;BR /&gt;IsPipe = Left(PartName, 4)&lt;BR /&gt;End If&lt;BR /&gt;If IsPipe &amp;lt;&amp;gt; "Pipe" Then&lt;BR /&gt;IsFlange = Left(PartName, 45)&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;If(i = vbOK)Then&lt;BR /&gt;NozzleSize = dlg.NozzleSize&lt;BR /&gt;PipeFlangeOffset = dlg.PipeFlangeOffset&lt;BR /&gt;NewNozzleProjection = dlg.NewNozzleProjection&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;If NozzleSize &amp;lt;&amp;gt; "" And NozzleSize &amp;lt;&amp;gt; " " And NozzleSize &amp;lt;&amp;gt; nil Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If IsPipe = "Pipe" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewName = IsPipe &amp;amp; " " &amp;amp; NozzleSize &amp;amp; " - XS - .001"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;replacer.Replace(pPartName, PfamilyName, pNewName)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pNewPipeName = pNewName &amp;amp; ":1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name = pNewPipeName&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Parameter(pNewPipeName, "PL") = OldPlength&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;If IsFlange = "ASME B16.5 Flange Slip-On Welding - Class 150" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;fPartName = PartName &amp;amp; ":1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;NewFlange = IsFlange &amp;amp; " " &amp;amp; NozzleSize&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;replacer.Replace(fPartName, FfamilyName, NewFlange)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;If PipeFlangeOffset &amp;lt;&amp;gt; "" And PipeFlangeOffset &amp;lt;&amp;gt; " " And PipeFlangeOffset &amp;lt;&amp;gt; nil Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Parameter(oDoc, "d0") = PipeFlangeOffset&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;If NewNozzleProjection &amp;lt;&amp;gt; "" And NewNozzleProjection &amp;lt;&amp;gt; " " And NewNozzleProjection &amp;lt;&amp;gt; nil Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Parameter(oDoc, "d4") = NewNozzleProjection&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;End If&lt;BR /&gt;&lt;BR /&gt;Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;UpdateNozzle&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Sub UpdateNozzle&lt;BR /&gt;InventorVb.DocumentUpdate&lt;BR /&gt;InventorVb.SetViewCamera(ViewCameraOption.FitExtents, New Double() {-121.30039731877672, 145.50927339213723, 145.44114957469338}, New Double() {24.208876073360443, 0, -0.068123817443847656}, New Double() {0.40824829046386318, 0.81649658092772592, -0.40824829046386313}, New Double() {76.824887490943567, 87.260303212016993})&lt;BR /&gt;IsFlange = nil&lt;BR /&gt;IsPipe = nil&lt;BR /&gt;PartName = nil&lt;BR /&gt;CurrentNozzleProjection = nil&lt;BR /&gt;NewNozzleProjection = nil&lt;BR /&gt;PipeFlangeOffset = nil&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;I figured out if I use &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name = pNewPipeName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;I can rename the pipe and continue on.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;You will need a pipe and a 150# raised face slip on flange parts put together in an assembly.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;You will also need to create a dialog in Dot Net and build as a DLL. The Dot Net code is as follows :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Class Dialog1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public NozzleSize As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public CurrentSize As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public PipeFlangeOffset As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public PipeWall As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public CurrentNozzleProjection As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public NewNozzleProjection As String&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NozzleSize = TextBox1.Text&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PipeFlangeOffset = TextBox2.Text&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewNozzleProjection = TextBox3.Text&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.DialogResult = System.Windows.Forms.DialogResult.OK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Close()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.DialogResult = System.Windows.Forms.DialogResult.Cancel&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.Close()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Dialog1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label2.Text = "Current Nozzle Size = " &amp;amp; CurrentSize&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label5.Text = "Current Pipe/Flange Offset = " &amp;amp; PipeFlangeOffset&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label6.Text = "Current Pipe Wall Thickness = " &amp;amp; PipeWall&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label8.Text = "Current Nozzle Projection = " &amp;amp; CurrentNozzleProjection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.Focus()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.SelectAll()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub Dialog1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label2.Text = "Current Nozzle Size = " &amp;amp; CurrentSize&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label5.Text = "Current Pipe/Flange Offset = " &amp;amp; PipeFlangeOffset&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label6.Text = "Current Pipe Wall Thickness = " &amp;amp; PipeWall&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label8.Text = "Current Nozzle Projection = " &amp;amp; CurrentNozzleProjection&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.Focus()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.SelectAll()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;BR /&gt;&lt;BR /&gt;End Class&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 18:29:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-variable-transfer/m-p/2927266#M141358</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-23T18:29:43Z</dc:date>
    </item>
  </channel>
</rss>

