Author Topic: Change A script  (Read 4249 times)

0 Members and 1 Guest are viewing this topic.

mcn

  • Guest
Change A script
« on: July 25, 2008, 07:42:57 AM »
I have the following program which was created by a friend of mine. The program works very fine, but i want to add some extra features. My friend doesn't have time to do it, so I hope you will help me to do what I want.
I need to insert data from Excel sheets not from .dat files. These is first thing and to do some small customization of the script to add some percentage (%) character for the slope. and to trim the above manhole after the line on the top.

I don't know how to do it, that way I ask you.

Best Regards.
Marius

DEVITG

  • Bull Frog
  • Posts: 481
Re: Change A script
« Reply #1 on: July 25, 2008, 02:53:23 PM »
Did you ask it to the author ??

Please keep the LOG updated and let me know of major changes at:
               ; netaqua@gmail.com


Location @ Córdoba Argentina Using ACAD 2019  at Window 10

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #2 on: July 25, 2008, 04:45:55 PM »
Marius, welcome to the swamp.

Note that reading Excel files is full of little catches that could give you problems.
That being said there are lots of examples of Excel file reading. It is easier to read CSV files
or comma delimited files. Looking at your data file, the data is positionally sensitive.
To me that is the least desirable way to develop a data file.

Will the lisp work on any CAD system as it is?
Do you have a Excel data file for testing?

How much LISP programing can you do?


PS
I see you registered in November of 2007 and just now posting for the first time.
« Last Edit: July 25, 2008, 05:47:36 PM by CAB »
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.

mcn

  • Guest
Re: Change A script
« Reply #3 on: July 28, 2008, 08:22:50 AM »
Yes, I've asked the author, which is my friend.

The second one I have an excel sheet and is working, I translate from excel to .dat file.
I will attach the excel sheet and also i don't know any thing about lisp programing, sorry.

thanks.

DEVITG

  • Bull Frog
  • Posts: 481
Re: Change A script
« Reply #4 on: July 28, 2008, 02:05:26 PM »
so you will work , at least , from the .dat file .

Using LISP , is better to work wit CSV file , also you can get it from the xls , by SAVING AS

It will better if you can upload a DWG sample of what this lisp can do , or wghat do you want to be done.

Location @ Córdoba Argentina Using ACAD 2019  at Window 10

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #5 on: September 16, 2008, 07:54:47 AM »
DEVITG,
Are you the author?
I just opened the lisp in the zip file & found this header:
Quote
; PLEASE DO NOT REMOVE THE FOLLOWING LINES
;;; -------------------------------------- ;;;
;;; Trasare profil longitudinal CANALIZARE ;;;
;;; Ver. 1.1                    25.04.2005 ;;;
;;; -------------------------------------- ;;;
;;;                            NETAQUA srl ;;;
;;;                      Water Engineering ;;;
;;; _______________________________________;;;
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.

DEVITG

  • Bull Frog
  • Posts: 481
Re: Change A script
« Reply #6 on: September 16, 2008, 08:27:49 AM »
DEVITG,
Are you the author?
I just opened the lisp in the zip file & found this header:
Quote
; PLEASE DO NOT REMOVE THE FOLLOWING LINES
;;; -------------------------------------- ;;;
;;; Trasare profil longitudinal CANALIZARE ;;;
;;; Ver. 1.1                    25.04.2005 ;;;
;;; -------------------------------------- ;;;
;;;                            NETAQUA srl ;;;
;;;                      Water Engineering ;;;
;;; _______________________________________;;;


Hi Cab , no I am not the author .
If you see my first post I put this warning about to ask the author .



Quote
Did you ask it to the author ??

Please keep the LOG updated and let me know of major changes at:
               ; netaqua@gmail.com

And he say it is a friend of him.

Quote
Yes, I've asked the author, which is my friend.

Location @ Córdoba Argentina Using ACAD 2019  at Window 10

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #7 on: September 16, 2008, 08:41:50 AM »
Thanks, just wanted to be clear.
 :-)
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.

DEVITG

  • Bull Frog
  • Posts: 481
Re: Change A script
« Reply #8 on: September 16, 2008, 10:36:44 AM »
OK

Clear counts , keep friendship.

Location @ Córdoba Argentina Using ACAD 2019  at Window 10

mcn

  • Guest
Re: Change A script
« Reply #9 on: September 18, 2008, 04:02:55 AM »
I attached the example of this lisp, what can do.

b.r. marius

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #10 on: September 18, 2008, 08:13:19 AM »
I'm not sure because I could not translate the comments but try changing this code:
Code: [Select]
      (command "text"
       "J"
       "MC"
       (list (+ 1.5 xpar) (- datum 58.0))
       "2.0"
       (- (atof (angtos (atan (/ 13.0 diparr)))))
       panta
      )
     
To this code: 
Code: [Select]
      (command "text"
       "J"
       "MC"
       (list (+ 1.5 xpar) (- datum 58.0))
       "2.0"
       (- (atof (angtos (atan (/ 13.0 diparr)))))
       (strcat panta " %") ; <-----<<  Change this
      )
   
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.

mcn

  • Guest
Re: Change A script
« Reply #11 on: September 18, 2008, 09:02:38 AM »
thanks, works fine, could you help me with another thing. I attached to the file with how is look, but i need another row between invert level and partial length with the following name and equation: Manual digging, invert level-10cm.


best regrds,
marius

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #12 on: September 18, 2008, 07:44:16 PM »
If I have some time this weekend but I would need the profil2.DAT file for testing the routine.

I am having problems translating some words from Romanian to English but I think I can overcome that problem.
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Change A script
« Reply #13 on: September 18, 2008, 07:53:17 PM »
Words I can not translate are
Trasare
traseaza
oriz
cartus

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.

mcn

  • Guest
Re: Change A script
« Reply #14 on: September 19, 2008, 02:20:51 AM »
Trasare=lining or laying a line
traseaza=create a line from 1 point to another
oriz=horizontal
cartus= it think is the table under the profile, with all the in formations