<?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: def function inside the main python script in AutoCAD Plant 3D Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12114438#M18245</link>
    <description>&lt;P&gt;I am having an issue in calling other script into main script. I have two. First is the modelling script and second is the one that calls first for geometry creation. Everything works fine and geometry is createdbut I cannot rotate or translate or subtract/unite the geometry created this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First script (Modeller.py)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from varmain.primitiv import *&lt;/P&gt;&lt;P&gt;from varmain.custom import *&lt;/P&gt;&lt;P&gt;from math import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def strBeam(s, L=25, W=25, H=1000):&lt;/P&gt;&lt;P&gt;-&amp;gt;s1= BOX(s, L=L, W=W, H=H). translate ((H/2, 0, W/2)) # create and move box on positive XZ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Main Script (TestBeam.py)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from varmain.primitiv import *&lt;/P&gt;&lt;P&gt;from varmain.custom import *&lt;/P&gt;&lt;P&gt;from math import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;scriptpath =os.path.normpath(sys.PnP3dNativeContentCustomScriptsPath)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if scriptpath not in sys.path:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;sys.path.append(scriptpath)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from Modeller import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous(Group="Sleeve", TooltipShort="Straight Beam", TooltipLong="Straight Beam", LengthUnit="mm", Ports="2")&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8108781"&gt;@group&lt;/a&gt;("MainDimensions")&lt;/P&gt;&lt;P&gt;@Anonymous(LN=LENGTH,&amp;nbsp;&lt;SPAN&gt;TooltipShort="length", TooltipLong="length")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@Anonymous(WI=LENGTH,&amp;nbsp;TooltipShort="width", TooltipLong="width")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@Anonymous(HI=LENGTH,&amp;nbsp;TooltipShort="height", TooltipLong="height")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8108781"&gt;@group&lt;/a&gt;(Name="meaningless enum")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(1, "Align X")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(2, "Align Y")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(3, "Align Z")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;def TestBeam(s, LN=2000.0, WI=50.0, HI=50.0, ID="TestBeam", **kw):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1 = strBeam(s,&amp;nbsp;s, L=WI, W=HI, H=LN) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #line1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1.translate((50,50,50)) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #line2 random move&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1.rotateZ(90.0) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#line3 random rotate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; mark is to show proper indentation here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So when I compile and test run TestBeam script. It successfully calls the Modeller.py and uses strBeam to create a box (i.e. if the code termibate at line1). But if I try to move or rotate it (i.e. if the code also has either line2 or line3), geometry failed to create and I am thrown an error 'geometry cannot be created wuth given parameter.nil'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So any help guys??&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 10:08:11 GMT</pubDate>
    <dc:creator>theshoaib.mughal</dc:creator>
    <dc:date>2023-07-20T10:08:11Z</dc:date>
    <item>
      <title>def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11095221#M18236</link>
      <description>&lt;P&gt;I would like to use an "inner" function in python multiple times to create a more advanced script where I do not need to use the same lines over and over again. But it seems anything created in the "inner" function does not exist in the main, outer script. Is there any solution for this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A very simple example here:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;from varmain.primitiv import *
from varmain.custom import *
from math import *

@activate(Group="Support", TooltipShort="Class1", TooltipLong="Class1", LengthUnit="mm", Ports="1")
@group("MainDimensions")
@param(D=LENGTH, TooltipLong="length of box")

def Class1(s,D=50.0,**kw):

	def Inner():
		o1=BOX(s,L=D,H=D,W=D)
		return o1
		
	Inner()
	#up to this line the scripts runs smoothly, the box is generated by the "Inner" function with sides "D"
	
	o1.translate((0,10,0))
	#this translate generates and error because "o1" object seems to be not existing outside the inner function
	
	s.setPoint((0,0,0),(1,0,0))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 12:39:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11095221#M18236</guid>
      <dc:creator>halitomi</dc:creator>
      <dc:date>2022-04-09T12:39:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097463#M18237</link>
      <description>&lt;P&gt;Dear &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/911646"&gt;@halitomi&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A question about your script structure where did you get this information?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 06:03:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097463#M18237</guid>
      <dc:creator>h_eger</dc:creator>
      <dc:date>2022-04-11T06:03:10Z</dc:date>
    </item>
    <item>
      <title>Betreff: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097494#M18238</link>
      <description>&lt;P&gt;I am not sure if this answers your question:&lt;/P&gt;&lt;P&gt;I have tested the script both with the translate function and without it. Without it, there is no error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also any other command which “needs” o1 generates an error if the command is outside the inner function.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 06:25:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097494#M18238</guid>
      <dc:creator>halitomi</dc:creator>
      <dc:date>2022-04-11T06:25:17Z</dc:date>
    </item>
    <item>
      <title>Betreff: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097502#M18239</link>
      <description>&lt;P&gt;Yes this will also happen in the future.&lt;BR /&gt;Attached is the tutorial for scripting in Plant 3D with Python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 06:29:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097502#M18239</guid>
      <dc:creator>h_eger</dc:creator>
      <dc:date>2022-04-11T06:29:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097510#M18240</link>
      <description>&lt;P&gt;I know this document. It is just strange that I can not use the “def” function here, as far as I understand it is basic python stuff.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 06:36:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097510#M18240</guid>
      <dc:creator>halitomi</dc:creator>
      <dc:date>2022-04-11T06:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097922#M18241</link>
      <description>&lt;P&gt;You can define multiple functions in a single file, they just need to be outside of each other (I haven't tested nested), I did that before (multiple separate functions) when I needed the user to be able to select different beam geometry in a support in the objects properties in plant, external function would do a very simple lookup and generate/return the created beam geometry that got stored in a main function variable.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 10:24:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11097922#M18241</guid>
      <dc:creator>George.Endrulat</dc:creator>
      <dc:date>2022-04-11T10:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11098212#M18242</link>
      <description>&lt;P&gt;wow, thanks George!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe I am asking too much here:&lt;/P&gt;&lt;P&gt;But would you share a sample script using multiple defs? (just a simple one where one is making a box while the other a cylinder or something like that, I do not need the actual big one)&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 12:29:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11098212#M18242</guid>
      <dc:creator>halitomi</dc:creator>
      <dc:date>2022-04-11T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11098252#M18243</link>
      <description>&lt;P&gt;It's easier than that, I'm sure you've decompiled the .pyc files in the variants.zip file, after you've decompiled those have a look through them, there's plenty in there with examples of it and examples of how to do just about everything.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 12:49:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11098252#M18243</guid>
      <dc:creator>George.Endrulat</dc:creator>
      <dc:date>2022-04-11T12:49:11Z</dc:date>
    </item>
    <item>
      <title>回复： def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11341545#M18244</link>
      <description>&lt;P&gt;&lt;FONT size="4" color="#17293f"&gt;Change it to the following. It should be OK.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from varmain.primitiv import *
from varmain.custom import *
from math import *
def Inner():
	o1=BOX(s,L=D,H=D,W=D)
	return o1
@activate(Group="Support", TooltipShort="Class1", TooltipLong="Class1", LengthUnit="mm", Ports="1")
@group("MainDimensions")
@param(D=LENGTH, TooltipLong="length of box")

def Class1(s,D=50.0,**kw):
	o1=Inner().translate((0,10,0))
	s.setPoint((0,0,0),(1,0,0))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Aug 2022 06:43:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/11341545#M18244</guid>
      <dc:creator>李榕华|Ronghua.LI</dc:creator>
      <dc:date>2022-08-05T06:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12114438#M18245</link>
      <description>&lt;P&gt;I am having an issue in calling other script into main script. I have two. First is the modelling script and second is the one that calls first for geometry creation. Everything works fine and geometry is createdbut I cannot rotate or translate or subtract/unite the geometry created this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First script (Modeller.py)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from varmain.primitiv import *&lt;/P&gt;&lt;P&gt;from varmain.custom import *&lt;/P&gt;&lt;P&gt;from math import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def strBeam(s, L=25, W=25, H=1000):&lt;/P&gt;&lt;P&gt;-&amp;gt;s1= BOX(s, L=L, W=W, H=H). translate ((H/2, 0, W/2)) # create and move box on positive XZ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Main Script (TestBeam.py)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from varmain.primitiv import *&lt;/P&gt;&lt;P&gt;from varmain.custom import *&lt;/P&gt;&lt;P&gt;from math import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;scriptpath =os.path.normpath(sys.PnP3dNativeContentCustomScriptsPath)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if scriptpath not in sys.path:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;sys.path.append(scriptpath)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;from Modeller import *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous(Group="Sleeve", TooltipShort="Straight Beam", TooltipLong="Straight Beam", LengthUnit="mm", Ports="2")&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8108781"&gt;@group&lt;/a&gt;("MainDimensions")&lt;/P&gt;&lt;P&gt;@Anonymous(LN=LENGTH,&amp;nbsp;&lt;SPAN&gt;TooltipShort="length", TooltipLong="length")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@Anonymous(WI=LENGTH,&amp;nbsp;TooltipShort="width", TooltipLong="width")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@Anonymous(HI=LENGTH,&amp;nbsp;TooltipShort="height", TooltipLong="height")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8108781"&gt;@group&lt;/a&gt;(Name="meaningless enum")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(1, "Align X")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(2, "Align Y")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@enum(3, "Align Z")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;def TestBeam(s, LN=2000.0, WI=50.0, HI=50.0, ID="TestBeam", **kw):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1 = strBeam(s,&amp;nbsp;s, L=WI, W=HI, H=LN) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #line1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1.translate((50,50,50)) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #line2 random move&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-&amp;gt;beam1.rotateZ(90.0) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#line3 random rotate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; mark is to show proper indentation here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So when I compile and test run TestBeam script. It successfully calls the Modeller.py and uses strBeam to create a box (i.e. if the code termibate at line1). But if I try to move or rotate it (i.e. if the code also has either line2 or line3), geometry failed to create and I am thrown an error 'geometry cannot be created wuth given parameter.nil'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So any help guys??&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 10:08:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12114438#M18245</guid>
      <dc:creator>theshoaib.mughal</dc:creator>
      <dc:date>2023-07-20T10:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12115933#M18246</link>
      <description>&lt;P&gt;It looks like you have an extra parameter when you are creating beam1&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-07-20_15-43-00.png" style="width: 359px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1243048iD44DF0D4D95605BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-07-20_15-43-00.png" alt="2023-07-20_15-43-00.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 21:46:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12115933#M18246</guid>
      <dc:creator>matt.worland</dc:creator>
      <dc:date>2023-07-20T21:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12116780#M18247</link>
      <description>&lt;P&gt;Oh thats just typo error here. In the code its not there and like i said that geometry is created perfectly but I cannot perform any actions on it like translate, rotate, unite, subtract etc. That's what i need&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 08:52:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12116780#M18247</guid>
      <dc:creator>theshoaib.mughal</dc:creator>
      <dc:date>2023-07-21T08:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12431818#M18248</link>
      <description>&lt;P&gt;I am dfacing similar problem, any suggestions??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2023 19:52:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12431818#M18248</guid>
      <dc:creator>mikael.santospj</dc:creator>
      <dc:date>2023-12-10T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12432156#M18249</link>
      <description>&lt;P&gt;I have same error with you. Successful call shade after that can't move or rotate.&lt;BR /&gt;Anyone have solution ?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 02:52:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12432156#M18249</guid>
      <dc:creator>tri.ptPE4JB</dc:creator>
      <dc:date>2023-12-11T02:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12432368#M18250</link>
      <description>&lt;P&gt;You simply need to add a ‘return’ value at the end of the function. Without that the function only creates geometry but main function cannot play with it. If you return it with a value then the holding variable in the main function can play around with it&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 06:18:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12432368#M18250</guid>
      <dc:creator>theshoaib.mughal</dc:creator>
      <dc:date>2023-12-11T06:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12433448#M18251</link>
      <description>&lt;P&gt;Thanks, it worked&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikaelsantospj_0-1702309139727.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1303405iEB02BEAFF961E7C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mikaelsantospj_0-1702309139727.png" alt="mikaelsantospj_0-1702309139727.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 15:40:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12433448#M18251</guid>
      <dc:creator>mikael.santospj</dc:creator>
      <dc:date>2023-12-11T15:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: def function inside the main python script</title>
      <link>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12434199#M18252</link>
      <description>&lt;P&gt;My pleasure&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 17:46:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-plant-3d-forum/def-function-inside-the-main-python-script/m-p/12434199#M18252</guid>
      <dc:creator>theshoaib.mughal</dc:creator>
      <dc:date>2023-12-11T17:46:08Z</dc:date>
    </item>
  </channel>
</rss>

