I'm currently new to python and working on a Class Project trying to create multiple polylines based on the tracking of Rhinos. I have the approach right, but I somehow have the variables switched around.
The Rhino would be the key value, and the points would have to be added into it. The example would be "Rhino : {(Point 1),(Point 2)}".
Somehow I can't get it. I can get the polyline to form, but I only get one giant line and not a multiple set of polylines based on the Rhino.
Here is the script I have written down.(re-edited to just the definition of the function)
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">rhinoTracker</SPAN><SPAN class="punctuation token">(</SPAN>Rhino<SPAN class="punctuation token">,</SPAN> X<SPAN class="punctuation token">,</SPAN> Y<SPAN class="punctuation token">,</SPAN> dictionary<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
XYCoord <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>X<SPAN class="punctuation token">,</SPAN> Y<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> Rhino <SPAN class="operator token">not</SPAN> <SPAN class="keyword token">in</SPAN> dictionary<SPAN class="punctuation token">:</SPAN>
dictionary<SPAN class="punctuation token">[</SPAN>Rhino<SPAN class="punctuation token">]</SPAN><SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
dictionary<SPAN class="punctuation token">[</SPAN>Rhino<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>append<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>XYCoord<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>