Jump to content

Recommended Posts

Posted

Hello everyone. I just started reading stuffs and tutorials about lisp programming because I want to make a surveying program because I cant afford to buy one. Also, I want to learn the beauty of lisp.

 

What I want is that to input first all the necessary data (name of lot, lot owner, location, geodetic engineer, date of survey, etc) which can be used for the other lisp program i will be making. My problem is I dont know how to start this.

 

I know that the community here is very helpful so thanks in advance. God bless

Posted

Hi Russello

 

Start making a NEW program, that is quite a fast conclusion.

It will definitely cost you a lot of time and money to get the functions you would like.

Here and there there are some applications you should check out..

 

http://www.glamsen.se/CadTools.htm

https://www.bricsys.com/applications/a/?geotools-v18-a1041-al1818

 

Most of the time people just start drawing first ;-) metadata, data management en the excels come later. And while thinking of it i think GIS functions might good use for you. ESRI Acrgis is expensive but there are also open GIS sollutions. http://www.qgis.org/nl/site/

 

Last but not least, I believe Autodesk has things in there app store as well, MAP etc, probably you know that good.

Posted

Russello "can not afford it" if your looking at this as a profession then sometimes you have to spend money to make money. There is some alternatives to Autocad like Briscad + http://www.civilsurveysolutions.com.au If you want to stay with Autocad then the new pay by the month should work for you.

 

You have only really spoken about doing lot plans Drafsight would meet your needs and its free. If you want the works download from total station, lot creation, contouring etc you need a full package.

Posted

Thank you sir halam and sir BIGAL for your suggestions and for the links. That would be a great help.

 

I think I misused the world "creating a surveying program", sorry for that. What I would like to achieve is to create lisp routines that will result to create survey plan (with a format from my country) and export a lot data computation.

 

Attached here are the survey plan (dwg) and Lot Data Computation (doc).

 

These are results of a custom program installed at AutoCAD which I believed powered by lisp which cost about 1000 USD and I believe the price was too much.

 

For the survey plan, I already have a lisp that can determine the area, lot numbering, the technical description table (bearings and distances), corner numbering. (I already have a block for the survey plan).

 

For the Lot Data Computation, I totally have no idea how to do it.

 

Hoping for you insights and help. thanks sir

LOT 5377-H, CSD-07-024417, BINGAG, DAUIS, BOHOL.dwg

LOT 5377-H, CSD-07-024417, BINGAG, DAUIS, BOHOL.docx

Posted

The lot data doc does not look that hard in lisp you can write to a file in this case a text file but can open with Ms Word etc. You can pick the existing text or redo the pick points may be easier. Will try to do an example later starting with your doc.

Posted

In short - All of this is doable with LISP, but requires a tremendous amount of effort along with knowledge that includes:

  • accessing/parsing variables
  • list manipulation
  • file handling or scripting objects

You use attributed blocks to store info - thats a good thing, but if you have to extract some values from "TEXT/MTEXT" objects you might get into some problems.

So either decide to dedicade a few years of volunteer-coding combined with decent amount interest, or save-up money from a few projects for such lisp program.

 

IMO these are your options:

 

It will definitely cost you a lot of time and money to get the functions you would like.

 

Russello "can not afford it" if your looking at this as a profession then sometimes you have to spend money to make money.

 

So Its up to you to decide how worthy is your time.

Also the same kind of work is evaluated differently in different countries, which is the cause of "thats too expensive".

Posted

Maybe it's not about the destination but the journey :-)

 

 

BTW , welcome to CadTutor Russello

 

 

Gr. Rlx

Posted

Any way I had a bit of a go needs a lot of improvement some bits work well others not just there, I use entsel for 1 text and nentsel for pick text from your block. The nentsel seems a bit works some times. But gives you an idea of how to start.

 

; pick single text
(defun getstr ( ) 
(setq ans
(vla-get-textstring
(vlax-ename->vla-object
(car (entsel msg))
)
)
)
)
; pick text out of a block not a attribute
(defun getstr2 ( ) 
(setq ans
(vla-get-textstring
(vlax-ename->vla-object
(car (nentsel msg))
)
)
)
)


(setq msg "Pick  lot number")(getstr)
(setq msg "Pick owners name")(getstr)
(setq msg  "Enter location")(getstr)
(setq id (getstring "Enter id "))

(setq fo (open  "c:\\temp\\testlost.txt" "w"))
(write-line fo)
(write-line "LMB Form No. GSD-B-11" fo)
(write-line fo)
(write-line fo)
(write-line "                        LOT DATA COMPUTATION SHEET"  fo)                
(write-line fo)
(write-line "                                                            Sheet : 1 / 1"   fo)
(setq msg "Pick  lot number")(getstr)
(write-line (strcat "Lot No.   :" ans "                        	Date Surveyed: " date ) fo)
(setq msg "Pick owners name")(getstr2)
(write-line (strcat "Owner     : " ans "                             JONATHAN J. YU" ) fo) 
(write-line "            Surname, Given Name                           Geodetic Engineer  "  fo) 
(setq msg  "Pick location")(getstr2)
(write-line (strcat "Location  : " ans))
(write-line "Surv. Sym. & No. :________________      L.R.C. No. :_________________ " fo)
(write-line fo)
(write-line "+-------------------------------------------------------------------------+" fo)
(write-line "| Sta  |   Azimuth    |     C O O R D I N A T E S    |  Line  |  Bearing  |" fo)
(write-line "| Cor  |   Distance   +------------------------------+--------+-----------" fo )
(write-line"|      |   Bearing    |   Northings   |  Eastings    |  Desc  |  Distance |"
(write-line "+=========================================================================+" fo)
(setq msg  "Pick Id")(getstr)
(write-line (strcat "Reference: " id ", Dauis, Bohol ")  fo)
(close fo)

Posted

Hi to all!

Thank you sir Grrr,rlx, and BIGAL. This may be a long journey but I am really eager to learn right now.

 

Sir BIGAL, I have a problem at the end of the routine, im getting this error after I input the "id":

 

; error: bad argument type: stringp #

 

Thanks in advance sir BIGAL

Posted

The example is hard coded for a test file called testlot.txt in the C:\temp directory. It was an example you can change \\temp\\ a directory on your computer, then it should work, had to output to somehwere to test.

Posted

Ok sir BIGAL. I will try to make a lisp routine and pls do check it and help me with it because I know I will encounter many problems. Maybe it wont run at all.

 

Thanks in advance sir! Good day

Posted

Just post your effort we will help if it does not work, we like to see effort by others and you will get more respect for having a go.

Posted

Hi sir BIGAL, sorry but I think it will take a while before I can start creating the lisp because my PC "exploded" a week ago. I'll post it asap. Thanks :)

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...