# Importing coordinates/points from CAD

**URL:** <https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921>\
**Category:** URScript\
**Tags:** welding\
**Created:** [April 26, 2021, 11:34am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921 "2021-04-26T11:34:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tor/32/1876_2.png) [@tor](https://forum.universal-robots.com/u/tor)\
**Post date:** [April 26, 2021, 11:34am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/1 "2021-04-26T11:34:08Z")

</div>

Hi,

Is there a way to import points or coordinates from a CAD model to a UR program? I’m the integrator in a welding project where the robot will make 210 spot welds on each side of a battery cell package. I have all the positions for the welds in CAD. Is there a way to import these points as coordinates for the UR, so I don’t have to manually enter all the positions by measuring in the CAD model (which I started doing)?

Best,  
Tor

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ajp/32/471_2.png) [@ajp](https://forum.universal-robots.com/u/ajp)\
**Post date:** [April 26, 2021, 11:58am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/2 "2021-04-26T11:58:39Z")

</div>

Hi @tor ,

We have post processor plugins available for Fusion360 and Solidworks that allows Gcode generated in these packages to be interpreted by the e-Series robot controller. See below for FAQ.

[https://www.universal-robots.com/articles/ur/application-installation/remote-tcp-toolpath-urcap-faq/](https://www.universal-robots.com/articles/ur/application-installation/remote-tcp-toolpath-urcap-faq/)

It’s intended for whole paths, but it should also be a fairly convenient way to handle your spot weld points too. I’m not sure if 210 toolpath nodes in a single program would work, but at the very least you could use it to move the robot to the appropriate points and then save them as standard waypoints.

---

<div class="post-metadata">

**Author:** ![tor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tor/32/1876_2.png) [@tor](https://forum.universal-robots.com/u/tor)\
**Post date:** [April 27, 2021, 8:57am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/3 "2021-04-27T08:57:40Z")

</div>

I have tried that in Fusion 360 actually. It does work, but I can’t figure out how to match my plane in UR with the coordinate system of the URscript file, since the only setting for the coordinate system I can do in Fusion is the one below, which is only one point and not the three needed to set up a working plane.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/a/a849045e73cafa9124273a73dfdaf14189b8d728.png)

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ajp/32/471_2.png) [@ajp](https://forum.universal-robots.com/u/ajp)\
**Post date:** [April 27, 2021, 9:42am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/4 "2021-04-27T09:42:18Z")

</div>

I assume you’re using CB3 as you’re exporting URScript? If you’re on e-Series use gcode format instead, it’s much more convenient as you can move the PCS on the fly.

In CB3 case, if you assign your feature frame to a variable in a polyscope program, you will get the resulting feature frame that’s calculated from the 3 points (which is also in pose format). Use those values as your PCS in 360 and it should work.

---

<div class="post-metadata">

**Author:** ![tor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tor/32/1876_2.png) [@tor](https://forum.universal-robots.com/u/tor)\
**Post date:** [April 28, 2021, 8:57am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/5 "2021-04-28T08:57:06Z")

</div>

I am using an e-series actually… and with the Toolpath URCap it was easy to set up the PCS as you said!

However, now that I have the robot moving to the correct positions I want to make them into waypoints. The task is to make 315 spot welds with the robot, and I have all the positions in CAD. But now I realised that even though I can make robot go to all the locations, it will be very time consuming as I have to restart the gcode everytime I make a new waypoint.

Do you have any suggestions to how I can make waypoints of these 315 positions without having to manually write the coordinates for each of them?

Since I have the coordinates for all the points, can I copy paste them into my UR program on my desktop somehow?

---

<div class="post-metadata">

**Author:** ![anibal.m.hillier](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@anibal.m.hillier](https://forum.universal-robots.com/u/anibal.m.hillier)\
**Post date:** [April 29, 2021, 2:59am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/6 "2021-04-29T02:59:06Z")

</div>

Hi @tor ,

the easy way would be to copy the gcode to an excel sheet (VS Code has an UR script plugin if you want something more professional) and re-shape it to something like:

global wp\_1 = p[0,0,0,0,0,0]  
global wp\_2 = p[x,x,x,x,x,x]  
…

then copy again to a text editor (notepad) and save as a .script file in the robot program folder. In that way you can call it as a script from the main welding program to initialize all the waypoints at once.

Also you will have to create another script to call each waypoint on a Move command, or you can create a new script that contains all the moves but you will lose the instruccion execution tracking on the screen.

Best regards,  
AMH

---

<div class="post-metadata">

**Author:** ![anon32310726](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon32310726](https://forum.universal-robots.com/u/anon32310726)\
**Post date:** [April 29, 2021, 7:14am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/7 "2021-04-29T07:14:01Z")

</div>

going on on this idea i am working on a similar idea.  
i have an array called “positions” and this array is filled with positions i want my welding torch to move to.  
i fill the array with function Position[i]=get\_actual\_tcp\_pose()  
i=i+1

the array then is filled wit positions= [p[x,x,x,x,x,x],p[x,x,x,x,x,x],p[x,x,x,x,x,x],p[x,x,x,x,x,x]]

then to move to these positions i use:  
movej(Position[i], a=1,v=1,t=o,r=0)  
i=i+1

in this order you dont need to name all the waypoints.

Best regards,  
Corné

---

<div class="post-metadata">

**Author:** ![anibal.m.hillier](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@anibal.m.hillier](https://forum.universal-robots.com/u/anibal.m.hillier)\
**Post date:** [April 29, 2021, 11:42am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/8 "2021-04-29T11:42:00Z")

</div>

Hi @anon32310726 ,

Yes, you can make a list with poses, but I remember there is a limit to the lenght of the list.

If my memory doesn’t fail the limit is near 33 items and in this project he’s using more than 300 points, so he won’t be able to load them on the same list.

But there is another thing about your procedure that I don’t understand, when you fill the list with poses (lets assume you are running a loop) you need to go first to each position to get the actual tcp pose, or am i missing sth?

Best regards,  
AMH

---

<div class="post-metadata">

**Author:** ![anon32310726](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@anon32310726](https://forum.universal-robots.com/u/anon32310726)\
**Post date:** [April 29, 2021, 2:37pm UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/9 "2021-04-29T14:37:03Z")

</div>

hi @anibal.m.hillier,

oewhh thnx for the information did not thought about that!

of course the aplication is a lot more complicated than that.  
but for your picture i need the cobot in freedrive mode and the operator wil go to the desired welding location and save the location.  
then the robot will take control and with touch sensing the product to find the seam.  
after that calculations are done for the right orientation and location.  
then cobot has to weld and walk trough the waypoints. for futher details i hope to finish the biggest part next week.

but back to the topic I needed a easy way for my calculations to write away and call waypoints i found this by calling the list positions.

for the different weld seams i can easily rewrite my variable.  
for teaching  
Weldseam\_1=positions  
Weldseam\_2=positions  
Weldseam\_3=positions  
etc.

and when calculating

positions=Weldseam\_1  
calculate weld 1  
Weld\_1 =positions  
positions=Weldseam\_2  
calculate weld 2  
Weld\_2 =positions  
etc.

and for welding itself  
positions=Weld\_1  
movej(Position[i], a=1,v=1,t=o,r=0)  
i=i+1  
etc

hope you get the point why i used a list otherwise just send me a message to keep the forum clean 🙂

Kind regards,  
Corné

---

<div class="post-metadata">

**Author:** ![tor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/tor/32/1876_2.png) [@tor](https://forum.universal-robots.com/u/tor)\
**Post date:** [May 7, 2021, 6:45am UTC](https://forum.universal-robots.com/t/importing-coordinates-points-from-cad/13921/10 "2021-05-07T06:45:26Z")

</div>

Hello again and thank you for your replies.

The method I ended up using for programming the 300 weld spots was to make a NC program in Fusion where the weld spots are drill holes. The positions have a certain dimension between them so by looking at the G-code from the NC-file I could then manually enter the coordinates on the teach pendant for the first position and then jog it to the next position (+3 X - 3Y etc.). By also having the same PCS in fusion as on the robot I could then check that the coordinates where matching.

It ended up being an OK solution even tho I had to do some monotonous work. It took me roughly 2 hours to set up waypoints for the 300 positions, so not too bad. Hopefully they all came out right so I don’t have to repeat the process 😉

/Tor
