Author Topic: Point Manager  (Read 10842 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Point Manager
« on: December 16, 2009, 10:37:16 AM »
This is a program that I have posted over at CADTutor, but I thought I'd share it with you fine people too  :-)

I wrote it to be a "universal" program to import/export points, my motivation being that I have seen so many requests for programs to either write points to a file, or create points at every point found in a file.

As it stands, the program can:

  • Insert a Block at all Points from a File (txt/csv)
  • Insert an ACAD Point at all Points from a File (txt/csv)
  • Insert an ACAD Point at all vertices on all/Selected LW/3D Polylines in a drawing
  • Create a LW/3D Polyline from all Points in a File (txt/csv)
  • Insert a Block at all/selected Points in a drawing
  • Export all/selected Points in a drawing to a File (txt/csv)
  • Create a LW/3D Polyline from all/Selected Points in a drawing
  • Insert a Block at all vertices of a LW/3D Polyline
  • Export all Vertices of a LW/3D Polyline to a File (txt/csv)
  • Create a LW/3D Polyline from all/selected LW/3D Polylines
  • Export all insertions of a Block to a File (txt/csv)
  • Insert a Point at all instances of a Block
  • Create a LW/3D Polyline at all insertions of a Block

<< More Information Can be Found by Clicking the "Help" Button >>

Dialog Preview:



Point Format Dialog:



Object Options Dialog:



Function Syntax:  PtManager  / PtM

More instructions are found in the header:

Code: [Select]
;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;;
;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;;
;;                                                                               ;;
;;                                                                               ;;
;;                          --=={  Point Manager  }==--                          ;;
;;                                                                               ;;
;;  Program will allow the user to manipulate points in the drawing or a file in ;;
;;  a variety of ways, including:                                                ;;
;;                                                                               ;;
;;  From File:-                                                                  ;;
;;  --------------                                                               ;;
;;                                                                               ;;
;;  - Insert a Block at all Points from a File (txt/csv)                         ;;
;;  - Insert a Point at all Points from a File (txt/csv)                         ;;
;;  - Create an LW/3D Polyline from all Points in a File (txt/csv)               ;;
;;                                                                               ;;
;;  From ACAD Points:-                                                           ;;
;;  ---------------------                                                        ;;
;;                                                                               ;;
;;  - Insert a Block at all/selected Points in a drawing                         ;;
;;  - Export all/selected Points in a drawing to a File (txt/csv)                ;;
;;  - Create an LW/3D Polyline from all/Selected Points in a drawing             ;;
;;                                                                               ;;
;;  From LW/3D Polylines:-                                                       ;;
;;  --------------------------                                                   ;;
;;                                                                               ;;
;;  - Insert a Block at all vertices of an LW/3D Polyline                        ;;
;;  - Export all Vertices of an LW/3D Polyline to a File (txt/csv)               ;;
;;  - Insert a Point at all Vertices of an LW/3D Polyline                        ;;
;;  - Create an LW/3D Polyline from all/selected LW/3D Polylines                 ;;
;;                                                                               ;;
;;  From Blocks:-                                                                ;;
;;  ----------------                                                             ;;
;;                                                                               ;;
;;  - Export all insertions of a Block to a File (txt/csv)                       ;;
;;  - Insert a Point at all instances of a Block                                 ;;
;;  - Create an LW/3D Polyline at all insertions of a Block                      ;;
;;                                                                               ;;
;;                                                                               ;;
;;  When reading from/writing to Files, a data delimiter may be selected from    ;;
;;  the drop-down, with the exception of using a CSV file, in which a comma must ;;
;;  be used.                                                                     ;;
;;                                                                               ;;
;;  The user can also choose to sort the points by X/Y/Z Coordinate, in          ;;
;;  Ascending or Descending order.                                               ;;
;;                                                                               ;;
;;  When the input is of Block type and output of File type (or vice-versa),     ;;
;;  Block Attributes may be written (or entered).                                ;;
;;                                                                               ;;
;;                                                                               ;;
;;                 --<<  Click Help for more information  >>--                   ;;
;;                                                                               ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;  FUNCTION SYNTAX:  PtManager  /  PtM  /  PTM_clear (Resets Defaults)          ;;
;;                                                                               ;;
;;  Notes:-                                                                      ;;
;;  -----------                                                                  ;;
;;  If no Z-Coord is found, zero elevation is assumed.                           ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;  AUTHOR:                                                                      ;;
;;                                                                               ;;
;;  Copyright © Lee McDonnell, December 2009. All Rights Reserved.               ;;
;;                                                                               ;;
;;      { Contact: Lee Mac @ TheSwamp.org, CADTutor.net }                        ;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;  VERSION:                                                                     ;;
;;                                                                               ;;
;;    ø 1.0   ~¤~   5th December 2009   ~¤~   º First Release                    ;;
;;...............................................................................;;
;;    ø 1.1   ~¤~   5th December 2009   ~¤~   º Added Dialog interface.          ;;
;;...............................................................................;;
;;    ø 1.2   ~¤~  11th December 2009   ~¤~   º Updated Dialog Interface to      ;;
;;                                              allow for various input/output.  ;;
;;...............................................................................;;
;;    ø 1.3   ~¤~  12th December 2009   ~¤~   º Added ability to Create LW and   ;;
;;                                              3D Polylines.                    ;;
;;...............................................................................;;
;;    ø 1.4   ~¤~  14th December 2009   ~¤~   º Added ability to select data     ;;
;;                                              delimiter when reading from/     ;;
;;                                              writing to files.                ;;
;;...............................................................................;;
;;    ø 1.5   ~¤~  17th December 2009   ~¤~   º Fixed Bug when selecting 3D poly ;;
;;                                              as output.                       ;;
;;...............................................................................;;
;;    ø 1.6   ~¤~  26th December 2009   ~¤~   º Added Ability to Extract Block   ;;
;;                                              information.                     ;;
;;...............................................................................;;
;;    ø 1.7   ~¤~  29th December 2009   ~¤~   º Added ability to sort points.    ;;
;;                                            º Added option to write/enter      ;;
;;                                              block attributes.                ;;
;;                                            º Improved Default Handling.       ;;
;;                                            º Added option to use 'other'      ;;
;;                                              delimiter.                       ;;
;;                                            º Added ability to change point    ;;
;;                                              format.                          ;;
;;...............................................................................;;
;;    ø 1.8   ~¤~    2nd January 2010   ~¤~   º Created Help File & added Help   ;;
;;                    (Not Released)            button.                          ;;
;;                                            º Fixed bug when selecting a block ;;
;;                                              input.                           ;;
;;...............................................................................;;
;;    ø 1.9   ~¤~    4th January 2010   ~¤~   º Modified Delimiter functions to  ;;
;;                                              accept delimiters of length > 1. ;;
;;...............................................................................;;
;;    ø 2.0   ~¤~    5th January 2010   ~¤~   º Modified Delimiter Mode_Tile     ;;
;;                                              functions.                       ;;
;;                                            º Fixed bug when selecting output  ;;
;;                                              block from drawing.              ;;
;;...............................................................................;;
;;    ø 2.1   ~¤~    7th January 2010   ~¤~   º Corrected Help File Typo.        ;;
;;                                            º Updated Delimiter Check Function ;;
;;...............................................................................;;
;;    ø 2.2   ~¤~    7th January 2010   ~¤~   º Added Object Options Button and  ;;
;;                                              Dialog.                          ;;
;;...............................................................................;;
;;    ø 2.3   ~¤~      8th March 2010   ~¤~   º Fixed bug to include elevation.  ;;
;;                                            º Added code to disable/enable     ;;
;;                                              Object Options button.           ;;
;;...............................................................................;;
;;    ø 2.4   ~¤~     19th April 2010   ~¤~   º Fixed bug when reading from      ;;
;;                                              files.                           ;;
;;...............................................................................;;
;;                                                                               ;;
;;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=;;
;;                                                                               ;;
;;;¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,;;;
;;;ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,¤º°`°º¤;;;

As always, your comments/criticism and suggestions for improvement, are very welcome.

Enjoy!

Lee


--=={ Code Updated to Version 2.4 }==--

Code available here.
« Last Edit: November 14, 2010, 08:11:55 PM by Lee Mac »

Harrie

  • Guest
Re: Point Manager
« Reply #1 on: December 16, 2009, 02:05:08 PM »
I see as output LW polylines and 2D polylines, but not a 3D polyline(Open space).

Regards, Harrie.
« Last Edit: December 16, 2009, 02:11:06 PM by Harrie »

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #2 on: December 16, 2009, 08:17:41 PM »
My apologies Harrie - a slight mistake on my part.  :oops:

I have updated the code to Version 1.5 and have rename the "2D Polyline" to "LW Polyline" to avoid confusion with the heavy 2D Polyline.

Lee

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #3 on: December 26, 2009, 08:18:53 AM »
Code in first post updated to Version 1.6, added Block as input type  :wink:

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #4 on: December 29, 2009, 06:01:45 PM »
I decided to invest a little time in this program and have updated the first post to Version 1.7.

This is a huge update, which adds a load of new features to the program, including the ability to sort points, change the point format, write/enter block attributes, choose an arbitrary data delimiter, among many other exciting updates.

Of course, your feedback is very welcome!

Enjoy,

Lee

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Point Manager
« Reply #5 on: December 29, 2009, 11:31:11 PM »
Thanks Lee, been too busy with the Holidays to give it a test drive but I will soon.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #6 on: December 30, 2009, 08:07:53 AM »
Thanks Lee, been too busy with the Holidays to give it a test drive but I will soon.


Thanks Alan - I had fun making it  :-)

Pad

  • Bull Frog
  • Posts: 342
Re: Point Manager
« Reply #7 on: January 04, 2010, 05:39:00 AM »
Hi Lee

Your half way there to a good survey point importer.
Would be great to be able to code the points before import, so that line work can be on different layers, different blocks can be inserted, rectangles drawn, arcs etc.. and all at a predetermined scale.

Cheers
Pad

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #8 on: January 04, 2010, 08:06:20 AM »
Thanks for the suggestion Pad, I appreciate it.

I am releasing a new version of this program momentarily, which squishes a few bugs, and also provides a help feature.

Regarding your suggestion, were you referring to perhaps having options on the dialog to choose layers/scale etc, or rather in the input file?

Thanks for the interest in the program,

Lee

Pad

  • Bull Frog
  • Posts: 342
Re: Point Manager
« Reply #9 on: January 04, 2010, 09:05:05 AM »
Hi Lee

the input file would have to have the code assigned already.
The point manager would then the interpret the codes possibly through a config file to then draw, lines on certain layers, with or without levels, rectangles, arcs, circles, blocks with orientation and scale etc.. it can become quite complex.

Attached are a couple of pictures showing what we currently use.

If its something you'd like to pursue further I can certainly provide you with more information

Cheers
P

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #10 on: January 04, 2010, 09:13:05 AM »
Wow! That looks like a huge amount of work... I'm not sure that I could take this that far... especially as it is just a "hobby"  ;-)

But I have a few extra ideas that would not be too hard to incorporate.

Thanks for the information and suggestions Pad!

Lee

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #11 on: January 04, 2010, 09:25:44 AM »
As promised, I have updated the code in the first post to Version 1.9.

I have fixed a few of the bugs found when using a Block as the input type, and have also modified a few of the functions to allow a Data delimiter of length greater than 1.

This version also includes a help button, which should provide enough information to get you going.  :-)

Enjoy!

Lee

Pad

  • Bull Frog
  • Posts: 342
Re: Point Manager
« Reply #12 on: January 04, 2010, 09:48:56 AM »
Yeah it could certainly start to snowball!

Look forward to seeing this evolve a little.

thanks
P

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Point Manager
« Reply #13 on: January 04, 2010, 11:45:06 AM »
Yeah it could certainly start to snowball!

Look forward to seeing this evolve a little.

Well, I was thinking of adding a section for Block Scale and also, a layer drop-down (currenly everything is inserted/created on the current layer), but I don't think I could get it to the level that you have posted - that looks like a very specialist program.

Just curious, is it freeware?


Pad

  • Bull Frog
  • Posts: 342
Re: Point Manager
« Reply #14 on: January 04, 2010, 12:31:21 PM »
unfortunately not
http://www.keycivil.com/products/land.shtml
Its more of a ground modelling package.