Jump to content

Recommended Posts

Posted

What does this mean there is a program on this website that will map my topo for me? Please explain what that thread is. I am really in the dark on this one.

  • Replies 149
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    69

  • keithlaser

    8

  • chulse

    6

  • SteveK

    6

Top Posters In This Topic

Posted Images

Posted

I suggested that you could use the program in the first post of this thread to manipulate your points.

Posted

what do you mean manipulate? I have the Northern, Easterly and elevation of roughly 100 points. I want to draw a topo so I can calc the cut and fill necessary for some civil work.

Posted

I have the Northern, Easterly and elevation for roughly 100 points. I somewhat new to this. This is the x,y and z coordinates if I am not mistaken. I just need to draw a contour map and profiles o specific threads. Please explain further what your program is and what it does. What does "block" mean? I am a serious newby and don't understand some of the lingo here.

Posted

You can use the program to read the points from a file, and furthermore create either a 3D/2D polyline at points, or perhaps insert a block/point at the points.

  • 1 month later...
Posted

Dear Mr Lee Mac!

I admire your Ptmanager, but could you answer me for a couple of questions?

Is it real to import point coordinates from MS Access database file?

Please show me in which direction should I go? Which method to choose(should i use ADO or CAO)?

Posted

Hi Agent Smith,

 

Firstly, glad you like the program :)

 

Certainly there is a lot of support for the ADO approach - with all the code from Flemmings group, and also a lot of code regarding this approach here.

 

Hope this helps!

 

Lee

Posted
Hi Agent Smith,

 

Firstly, glad you like the program :)

 

Certainly there is a lot of support for the ADO approach - with all the code from Flemmings group, and also a lot of code regarding this approach.

 

Hope this helps!

 

Lee

 

Thank you, great man! It worked!

 

I used this this small piece of code from ADOLISP_Example.lsp:

 

(defun C:Example (/ ConnectionObject Result ConnectString SQLStatement

TablesList ColumnsList

)

(setq ConnectString

"Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};DBQ=base.mdb"

)

(setq ConnectString "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=base.mdb;Persist Security Info=False")

(prompt (strcat "\n\nConnecting to the database using \n\""

ConnectString

"\""

)

)

(if (not (setq ConnectionObject

(ADOLISP_ConnectToDB ConnectString "admin" "")

)

)

(progn

(prompt "\nConnection failed!")

(ADOLISP_ErrorPrinter)

)

(prompt "\nResult: succeeded!")

)

(if ConnectionObject

(progn

 

(setq

SQLStatement "SELECT x,y,z FROM list where point='1'"

)

(prompt

(strcat

"\n\nExecuting a SELECT statement to retrieve some data:\n\""

SQLStatement

"\""

)

)

(if (setq Result (ADOLISP_DoSQL ConnectionObject SQLStatement))

(progn

(prompt "\nResult: ")

(print Result)

)

(progn

(prompt "\nFailed!")

(ADOLISP_ErrorPrinter)

)

)

)

)

 

in the AutoCAD's log i got:

Command: (load "adolisp_example.lsp")

Command: EXAMPLE

Connecting to the database using

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=base.mdb;Persist Security

Info=False"

Result: succeeded!

Executing a SELECT statement to retrieve some data:

"SELECT x,y,z FROM list where point='1'"

(("x" "y" "z") (10 10 0))

Disconnecting from the database

Please answer, how can I continue to use the result:

(("x" "y" "z") (10 10 0)) ?, if i want to get this points in 3D in Autocad?

Posted

You can use:

 

The Point function from here if you like, as follows:

 

(defun Point (pt)
 (entmakex (list (cons 0 "POINT")
                 (cons 10 pt))))

(Point (cadr '[b](("x" "y" "z") (10 10 0))))
[/b]

 

EDIT: I see from the code the result is stored in a variable 'Result', so perhaps:

 

(defun Point (pt)
 (entmakex (list (cons 0 "POINT")
                 (cons 10 pt))))

(Point (cadr [b]Result))[/b][b]

[/b]

Posted

Great Lee, forgive that asking so many noob-like questions. What books do you advise me to read about coding on Lisp?

Posted

Not a problem Agent Smith :)

 

I would advise that you look at web resources before shelling out on books - there is a great deal of information on the web, and pretty much all of it is free.

 

I would start by looking at sites like these to get the basics:

 

http://www.afralisp.net/

http://www.jefferypsanders.com/autolisptut.html

http://ronleigh.info/autolisp/index.htm

 

But if you wanted to really study the art of programming from the ground up, these are a bit more hardcore:

 

http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html

http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/clm/node1.html

 

Hope this helps!

 

Lee

  • 2 weeks later...
Posted

just reporting Lee a minor bug regarding exporting of LWpolyline coordinates, if the LWpolyline has an elevation, it is hard-coded to be 0.0 and not the actual elevation, i just made a quick fix for this yesterday for my quick use, so many thanks for this

Posted

Many thanks Wizman, I shall see to correcting that :) I'm glad you like the program :thumbsup:

Posted

Many thanks to Wizman for the bug report - I have updated the first post to Version 2.3. This should fix the problem, and also enable/disable the 'Object Options' Button accordingly.

  • 4 weeks later...
Posted

Hi Lee,

If we need the text file writes coordinates of X and Y only.

Can you able to add that option to the Point Manager?

Thanks.

Posted

I haven't worked on the code for it in ages, I shall have to see.

 

Thanks

  • 3 weeks later...
Posted

It looks like a very powerful lisp

 

I need to point to a spreadsheet (it looks like this will do it)

AND

point to the sheet on that spreadsheet

Will this do it?

 

I need to insert a block multiple times by reading the x and y coordinates from a spreadsheet.

 

the spreadsheet will be

 

c:\my documents\survey\abc engineering\test.xls

 

sheet; green street

 

column b7 - aa7 = x coordinate

column b8 - aa8 = y coordinate

 

 

insert block survey peg 1.dwg

Posted

This program will currently read from a csv or a txt file, and cannot currently read from an xls file (which takes quite a bit more code in fact).

 

Also, this program is engineered to read line by line such that the data on each line is separated by some delimiter (whether it be a space/comma/cell/tab etc).

 

That said, your task is not impossible and could be accomplished.

 

Lee

Posted
This program will currently read from a csv or a txt file... Lee

 

Just to add to this a bit, I was able to use VBA to add a button to my excel sheet (template) that automates the process of creating the csv file export after compiling data from multiple locations within the workbook. Let me know if you would like to see that code...

Posted
Just to add to this a bit, I was able to use VBA to add a button to my excel sheet (template) that automates the process of creating the csv file export after compiling data from multiple locations within the workbook. Let me know if you would like to see that code...

 

I would love this! Be warned, I know nothing of VBA and will ask many questions on how to run it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...