AutoCAD Land Desktop

AutoCAD Land Desktop

Reply
Valued Contributor
jregier
Posts: 71
Registered: ‎11-09-2003
Message 1 of 18 (984 Views)

Spot Elevation Extraction using lisp

984 Views, 17 Replies
04-08-2002 02:00 AM
what is the command line equivalent of surface utilities -> lable spot elevation. I need to extract surface elevation point values for a list of 7000 horizontal points. Where can i find a listing of command line equivalents for all map and land functions for lisp usage.
Jim
*Bud
Message 2 of 18 (984 Views)

Re: Spot Elevation Extraction using lisp

04-08-2002 02:38 AM in reply to: jregier
This is what it looks like with command echo
on:

(dt_mnl)(zz_sdsk '(dt_spotlabel))

 

I'm pretty sure it can't be called from the command
line.


Bud Miller

href="http://www.BudCAD.com">www.BudCAD.com

Legal Descriptions, Parcel,
Point &
Pline Reports, Layer Reports,
Automated Point Groups and
more.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
what
is the command line equivalent of surface utilities -> lable spot
elevation. I need to extract surface elevation point values for a list of 7000
horizontal points. Where can i find a listing of command line equivalents for
all map and land functions for lisp usage.
Jim
*Bud
Message 3 of 18 (984 Views)

Re:

04-08-2002 02:53 AM in reply to: jregier
From VBA you can use:

 

RetVal = object.GetElevation(Easting,
Northing)

 

where "object" is the surface.


Bud Miller

href="http://www.BudCAD.com">www.BudCAD.com

Legal Descriptions, Parcel,
Point &
Pline Reports, Layer Reports,
Automated Point Groups and
more.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

This is what it looks like with command echo
on:

(dt_mnl)(zz_sdsk '(dt_spotlabel))

 

I'm pretty sure it can't be called from the
command line.


Bud Miller

href="http://www.BudCAD.com">www.BudCAD.com

Legal Descriptions, Parcel,
Point &
Pline Reports, Layer Reports,
Automated Point Groups and
more.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
what
is the command line equivalent of surface utilities -> lable spot
elevation. I need to extract surface elevation point values for a list of
7000 horizontal points. Where can i find a listing of command line
equivalents for all map and land functions for lisp usage.

Jim
*Steltman, Robert
Message 4 of 18 (984 Views)

Re: Spot Elevation Extraction using lisp

04-08-2002 03:31 AM in reply to: jregier
(vlax-invoke-method
cur_surf
"getelevation"
easting
northing)

where cur_surf is the surface object you wish to query

--
*************************************************************
Steltman Software Solutions
Easy to Use, Productivity Tools for autodesk Land Desktop
web http://www.rsteltman.com/
email support@rsteltman.com
Toll Free 1.866.260.2514
Fax: 1.905.945.6549
*************************************************************
"jregier" wrote in message
news:f0cf7e3.-1@WebX.maYIadrTaRb...
> what is the command line equivalent of surface utilities -> lable spot
elevation. I need to extract surface elevation point values for a list of
7000 horizontal points. Where can i find a listing of command line
equivalents for all map and land functions for lisp usage.
> Jim
>
Valued Contributor
jregier
Posts: 71
Registered: ‎11-09-2003
Message 5 of 18 (984 Views)

Re:

04-08-2002 03:47 AM in reply to: jregier
Thanks Bud,
now i'm getting upset (not at you). why wouldn't there be a command line equivalent as per map functions. I did find that the function (dt_spotlabel) at the command line requests a leader point, but can't incorporate the function into a routine (would be re-entering lisp during execution). Where do I go from here.
Jim
*Comerford, Laurie
Message 6 of 18 (984 Views)

Re:

04-08-2002 05:51 AM in reply to: jregier
Jim,

The approach to programming with the ALDD objects is different from that
used historically for normal AutoCAD objects.

Bud's code here is the way to go, rather than trying to use an extract of
the menu line (Note in VBA you can use a SendCommand including the
(dt_spotlabel) components to use the ALDD commands)

You do need more code than indicated here though as you will have to define
the surface variable "object"

Have you looked in the sample code supplied with the software ?
--


Laurie Comerford
CADApps
www.cadapps.com.au

"Bud" wrote in message
news:F3BDDBF37F76D643F82E2FF93333A54B@in.WebX.maYIadrTaRb...
> From VBA you can use:
>
> RetVal = object.GetElevation(Easting, Northing)
>
> where "object" is the surface.
>
> Bud Miller
> www.BudCAD.com
> Legal Descriptions, Parcel, Point &
> Pline Reports, Layer Reports,
> Automated Point Groups and more.
>
> "Bud" wrote in message
news:CE65958067D85C4375716A2895481C79@in.WebX.maYIadrTaRb...
> This is what it looks like with command echo on:
> (dt_mnl)(zz_sdsk '(dt_spotlabel))
>
> I'm pretty sure it can't be called from the command line.
>
> Bud Miller
> www.BudCAD.com
> Legal Descriptions, Parcel, Point &
> Pline Reports, Layer Reports,
> Automated Point Groups and more.
>
> "jregier" wrote in message
news:f0cf7e3.-1@WebX.maYIadrTaRb...
> what is the command line equivalent of surface utilities -> lable spot
elevation. I need to extract surface elevation point values for a list of
7000 horizontal points. Where can i find a listing of command line
equivalents for all map and land functions for lisp usage.
> Jim
Valued Contributor
jregier
Posts: 71
Registered: ‎11-09-2003
Message 7 of 18 (984 Views)

Re:

04-08-2002 09:06 PM in reply to: jregier
Thanks all. Robert, what is the type and format of variable cur-surf, is it the name of the terrain surface, or an entity on the surface. I tried the sub-routine you posted, but it gives a bad-argument type for cur-surf (i tried the name of the surface terrain "EQUI_01_B2" and variations of entity selection).
Jim
*Peter Funk - Autodesk, Inc
Message 8 of 18 (984 Views)

Re:

04-08-2002 09:59 PM in reply to: jregier
As Robert said, cur-surf is the current surface
object. If you are just getting started using the ActiveX interface to LDDT, I
would suggest that you start in VBA. There are some great examples in the help
file, and that help file is tightly integrated with the VBA Editor. After you
get comfortable with working with LDDT object, either re code in LISP, or just
make a LISP wrapper to the VBA function. I realize that you probably don't know
VBA, but I bet that if you start with the examples, you will have more
done by this afternoon in VBA than if you worked all week translating
VBA to VisualLISP. Working with Object is much different than sending commands
via LISP. As such it takes a new programming style.

 

Regards,

 

Peter Funk

API Product Manager

Building Industry Division

Autodesk, Inc.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Thanks
all. Robert, what is the type and format of variable cur-surf, is it the name
of the terrain surface, or an entity on the surface. I tried the sub-routine
you posted, but it gives a bad-argument type for cur-surf (i tried the name of
the surface terrain "EQUI_01_B2" and variations of entity selection).

Jim
Valued Contributor
jregier
Posts: 71
Registered: ‎11-09-2003
Message 9 of 18 (984 Views)

Re:

04-08-2002 11:21 PM in reply to: jregier
Peter
you would bet wrong. while certainly not something commercial, the following routine doe what i need. I wrote and debugged it in less then 20 minutes. The get_elev is not the end result, the function will be dropped into elevation correction routines linked to external databases. I do thank all who have responded, it helped immensly - i have very little time for development, and need to program on the fly.

(defun get_elev ()
(setq e (entlast) d (entget e) elev (cdr (assoc 1 d)))
(command "erase" e "")
(alert (strcat "Elevation is " elev)))

(defun ldd_get_elev ()
(setq pt (getpoint) filenm "c:/acad/temp.scr" fileref (open filenm "w"))
(write-line "(dt_spotlabel)" fileref)
(write-line (strcat (rtos (car pt) 2 2) "," (rtos (cadr pt) 2 2)) fileref)
(write-line " " fileref)
(write-line "(get_elev)" fileref)
(close fileref)
(command "script" "c:/acad/temp.scr"))
*Peter Funk - Autodesk, Inc
Message 10 of 18 (984 Views)

Re:

04-09-2002 03:37 AM in reply to: jregier
If you want to expand into the more
powerful ActiveX interface instead of AutoLISP scripting, then my comment
stands.

 

Regards,

 

Peter Funk

API Product Manager

Building Industry Division

Autodesk, Inc.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.