Make a polygon out of list of lines

How can I make a polygon using list of different line lengths?

Let’s say I have 5,4,3 as the line lengths, and there is only one way to join those lines and make a triangle. Is there a way to do that in sketchup?

Your example is a bit misleading as that produces a right triangle and you can just draw it directly. Otherwise it is easiest to use a plugin, a couple of which are linked to in this thread:

5,4,3 are the unit lengths for the smallest triangle rectangle (Pytagore). Doing that with SketchUp (SU) is very easy. See this SU file.

Pytagore triangle.skp (71.2 KB)

If you have something more involved, you can use what Anssi has written. Take note that if you have four known segments, you need at least one known angle. Five segments, two angles. Etc.

I can be done without any plugin but it takes more time.