function [x,y] = getPtsFromPolyline(file, path)
        
        file = strcat(path,'\',file);
        lines = readlines(file);
        k = strfind(lines,'VERTEX');
        m = strfind(lines,'AcDb3dPolylineVertex');
        q = strfind(lines, 'AcDbPolyline');

        if any(cell2mat(k(:))==1) && any(cell2mat(m(:))==1) %upraveny dxf
             mIdx = findIndexesOfCell(m);
            x = [];
            y = [];
           for i = 1:length(mIdx)
                x(end+1) = str2double(lines(mIdx(i)+2));
                y(end+1) = str2double(lines(mIdx(i)+4));
            end

          %y = 1000-y;
        elseif any(cell2mat(k(:))==1)  % just VERTEX
         kIdx = findIndexesOfCell(k);
            x = [];
            y = [];
            for i = 1:length(kIdx)
                x(end+1) = str2double(lines(kIdx(i)+6));
                y(end+1) = str2double(lines(kIdx(i)+8));
            end
        else %from dwg
            x = [];
            y = [];
            qIdx = findIndexesOfCell(q);
            firstX = 6;
            i = 2;
            num = 2;
            while 1
              if ~isnan(str2double(lines(qIdx(num)+firstX +i)))
               x(end+1) = str2double(lines(qIdx(num)+firstX + i));
              else
                  break ;
              end
               y(end+1) = str2double(lines(qIdx(num)+firstX+i+2));
                     
                i = i+4;

            end

        end
        %x = x-x(1);
        x(1) = [];
        y(1) = [];
        x(end) = [];
        y(end) = [];   
 
end