AutoCAD Land Desktop

AutoCAD Land Desktop

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

Re:

04-09-2002 11:44 PM in reply to: jregier
OK, fair enough. But i still would like a (better) LISP function that returns the elevation (or nil if out of bounds) for a point on a surface. Ive loaded the vl com and reactors, and tried the vlisp help. Using Roberts suggestion as a starting point,
>
(vlax-invoke-method
cur_surf
"getelevation"
<
how do i set the cur_surf object - something similar to (setq cur_surf (vlax-get-object ???)).
Jim
*Peter Funk - Autodesk, Inc
Message 12 of 18 (982 Views)

Re:

04-10-2002 03:42 AM in reply to: jregier
OK, Now we're on the same page! You have all the
functionally that you need using the ActiveX interface to the LDDT object model
(including exactly what you are looking for). The help that you are looking for
will not be in the Vlisp help file, it will be in the landauto-reference.chm
file. This help file was written using the VBA syntax, but all the object,
methods and properties are available in Vlisp (once you add a reference to the
type library). If you really want to program in Vlisp, you will have to
translate the examples from VBA to VLisp. For LDDT, the starting point is the
LDDT application object, from there, the current Project, and from the project,
you are off and running. Again, look at the examples in the help file for how it
is done in VBA, and mimic that syntax. However, I really think that you will
make better use of your time if you program in VBA, and then wrap those routines
with LISP calls. Not only will you have a wealth of sample code, the VBA editor
is far better than the VLisp editor. As an added benefit, you will never have to
use DCL again!

 

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">
OK,
fair enough. But i still would like a (better) LISP function that returns the
elevation (or nil if out of bounds) for a point on a surface. Ive loaded the
vl com and reactors, and tried the vlisp help. Using Roberts suggestion as a
starting point,

(vlax-invoke-method
 cur_surf
 "getelevation"
<

how do i set the cur_surf object - something similar to (setq cur_surf
(vlax-get-object ???)).
Jim

*Steltman, Robert
Message 13 of 18 (982 Views)

Re:

04-10-2002 04:16 AM in reply to: jregier
(defun set_up_surfs (/)
;;;This will get the first surface defined!
;;;Note there are no error checkers
(princ
"\nCopyright© Robert Steltman Inc.\twww.rsteltman.com\tToll Free
1.866.260.2514\n")
(vl-load-com)
(setq acadObj (vlax-get-acad-object))
(setq aeccApp (vl-catch-all-apply
'vla-getinterfaceobject
(list acadObj "Aecc.Application")))
(setq aeccProj (vlax-get aeccApp "ActiveProject"))
(setq surfs (vlax-get aeccproj "surfaces"))
(setq cur_surf (vla-item surfs 0)))

--
*************************************************************
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
*************************************************************
"Peter Funk - Autodesk, Inc" wrote in message
news:0FB83D508561D0CF1692EE14DBC9C08F@in.WebX.maYIadrTaRb...
> OK, Now we're on the same page! You have all the functionally that you
need using the ActiveX interface to the LDDT object model (including exactly
what you are looking for). The help that you are looking for will not be in
the Vlisp help file, it will be in the landauto-reference.chm file. This
help file was written using the VBA syntax, but all the object, methods and
properties are available in Vlisp (once you add a reference to the type
library). If you really want to program in Vlisp, you will have to translate
the examples from VBA to VLisp. For LDDT, the starting point is the LDDT
application object, from there, the current Project, and from the project,
you are off and running. Again, look at the examples in the help file for
how it is done in VBA, and mimic that syntax. However, I really think that
you will make better use of your time if you program in VBA, and then wrap
those routines with LISP calls. Not only will you have a wealth of sample
code, the VBA editor is far better than the VLisp editor. As an added
benefit, you will never have to use DCL again!
>
> Regards,
>
> Peter Funk
> API Product Manager
> Building Industry Division
> Autodesk, Inc.
>
>
> "jregier" wrote in message
news:f0cf7e3.9@WebX.maYIadrTaRb...
> OK, fair enough. But i still would like a (better) LISP function that
returns the elevation (or nil if out of bounds) for a point on a surface.
Ive loaded the vl com and reactors, and tried the vlisp help. Using Roberts
suggestion as a starting point,
> (vlax-invoke-method
> cur_surf
> "getelevation"
> <
> how do i set the cur_surf object - something similar to (setq cur_surf
(vlax-get-object ???)).
> Jim
>
>
*Comerford, Laurie
Message 14 of 18 (982 Views)

Re:

04-10-2002 05:30 AM in reply to: jregier
Hi Robert,

A VBA equivalent is:

Function GetElev (dVar1 as double, dVar2 as double, sVar as string )
Dim oDTM as AeccSurface ' o for object
Dim dElev as Double
Set ogDTM = AeccApplication.ActiveProject.Surfaces.Item (sVar)
dElev = ogDTM.GetElevation (dVar1, dVar2)
GetElev = dElev ' Return the data to the calling function
End Function

Sub AnyOldCode ()
Dim sDTM as String ' s for string
Dim dEast as Double ' d for double
Dim dNorth as Double
dim dElev as Double
... Other code which will probably establish values for the variables below
sDTM = "Surface1" ' Can be any surface name
dEast = 1000 ' Can be any coordinate
dNorth = 1000 ' Can be any coordinate
dElev = GetElev (dEast, dNorth, sDTM) ' Call the function to get the
value
.... any other code
End Sub


This could be simplified by not using variables to get the data, but in a
real program East, North and sDTM etc would be held in variables:

dElev = AeccApplication.ActiveProject.Surfaces.Item
("Surface1").GetElevation (1000,1000)

It may be habit, but I find the VBA code easier to follow.
As Peter mentioned the sample code for VBA is far more extensive than for
Lisp.

--


Laurie Comerford
CADApps
www.cadapps.com.au


"Robert Steltman" wrote in message
news:7658CF2408FA41638AAFFEDE46D7D346@in.WebX.maYIadrTaRb...
> (defun set_up_surfs (/)
> ;;;This will get the first surface defined!
> ;;;Note there are no error checkers
> (princ
> "\nCopyright© Robert Steltman Inc.\twww.rsteltman.com\tToll Free
> 1.866.260.2514\n")
> (vl-load-com)
> (setq acadObj (vlax-get-acad-object))
> (setq aeccApp (vl-catch-all-apply
> 'vla-getinterfaceobject
> (list acadObj "Aecc.Application")))
> (setq aeccProj (vlax-get aeccApp "ActiveProject"))
> (setq surfs (vlax-get aeccproj "surfaces"))
> (setq cur_surf (vla-item surfs 0)))
>
> --
> *************************************************************
> 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
> *************************************************************
> "Peter Funk - Autodesk, Inc" wrote in message
> news:0FB83D508561D0CF1692EE14DBC9C08F@in.WebX.maYIadrTaRb...
> > OK, Now we're on the same page! You have all the functionally that you
> need using the ActiveX interface to the LDDT object model (including
exactly
> what you are looking for). The help that you are looking for will not be
in
> the Vlisp help file, it will be in the landauto-reference.chm file. This
> help file was written using the VBA syntax, but all the object, methods
and
> properties are available in Vlisp (once you add a reference to the type
> library). If you really want to program in Vlisp, you will have to
translate
> the examples from VBA to VLisp. For LDDT, the starting point is the LDDT
> application object, from there, the current Project, and from the project,
> you are off and running. Again, look at the examples in the help file for
> how it is done in VBA, and mimic that syntax. However, I really think that
> you will make better use of your time if you program in VBA, and then wrap
> those routines with LISP calls. Not only will you have a wealth of sample
> code, the VBA editor is far better than the VLisp editor. As an added
> benefit, you will never have to use DCL again!
> >
> > Regards,
> >
> > Peter Funk
> > API Product Manager
> > Building Industry Division
> > Autodesk, Inc.
> >
> >
> > "jregier" wrote in message
> news:f0cf7e3.9@WebX.maYIadrTaRb...
> > OK, fair enough. But i still would like a (better) LISP function that
> returns the elevation (or nil if out of bounds) for a point on a surface.
> Ive loaded the vl com and reactors, and tried the vlisp help. Using
Roberts
> suggestion as a starting point,
> > (vlax-invoke-method
> > cur_surf
> > "getelevation"
> > <
> > how do i set the cur_surf object - something similar to (setq cur_surf
> (vlax-get-object ???)).
> > Jim
> >
> >
>
>
*Uhden, John
Message 15 of 18 (982 Views)

Re:

04-10-2002 09:59 AM in reply to: jregier
220, 221... whatever it takes.

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"Laurie Comerford" wrote in message news:smileyvery-happy:23FE6436B15A42A05FBE78484AA58ED@in.WebX.maYIadrTaRb...
> Hi Robert,
>
> A VBA equivalent is:
>
> Function GetElev (dVar1 as double, dVar2 as double, sVar as string )
> Dim oDTM as AeccSurface ' o for object
> Dim dElev as Double
> Set ogDTM = AeccApplication.ActiveProject.Surfaces.Item (sVar)
> dElev = ogDTM.GetElevation (dVar1, dVar2)
> GetElev = dElev ' Return the data to the calling function
> End Function
>
> Sub AnyOldCode ()
> Dim sDTM as String ' s for string
> Dim dEast as Double ' d for double
> Dim dNorth as Double
> dim dElev as Double
> ... Other code which will probably establish values for the variables below
> sDTM = "Surface1" ' Can be any surface name
> dEast = 1000 ' Can be any coordinate
> dNorth = 1000 ' Can be any coordinate
> dElev = GetElev (dEast, dNorth, sDTM) ' Call the function to get the
> value
> .... any other code
> End Sub
>
>
> This could be simplified by not using variables to get the data, but in a
> real program East, North and sDTM etc would be held in variables:
>
> dElev = AeccApplication.ActiveProject.Surfaces.Item
> ("Surface1").GetElevation (1000,1000)
>
> It may be habit, but I find the VBA code easier to follow.
> As Peter mentioned the sample code for VBA is far more extensive than for
> Lisp.
>
> --
>
>
> Laurie Comerford
> CADApps
> www.cadapps.com.au
>
>
> "Robert Steltman" wrote in message
> news:7658CF2408FA41638AAFFEDE46D7D346@in.WebX.maYIadrTaRb...
> > (defun set_up_surfs (/)
> > ;;;This will get the first surface defined!
> > ;;;Note there are no error checkers
> > (princ
> > "\nCopyright© Robert Steltman Inc.\twww.rsteltman.com\tToll Free
> > 1.866.260.2514\n")
> > (vl-load-com)
> > (setq acadObj (vlax-get-acad-object))
> > (setq aeccApp (vl-catch-all-apply
> > 'vla-getinterfaceobject
> > (list acadObj "Aecc.Application")))
> > (setq aeccProj (vlax-get aeccApp "ActiveProject"))
> > (setq surfs (vlax-get aeccproj "surfaces"))
> > (setq cur_surf (vla-item surfs 0)))
> >
> > --
> > *************************************************************
> > 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
> > *************************************************************
> > "Peter Funk - Autodesk, Inc" wrote in message
> > news:0FB83D508561D0CF1692EE14DBC9C08F@in.WebX.maYIadrTaRb...
> > > OK, Now we're on the same page! You have all the functionally that you
> > need using the ActiveX interface to the LDDT object model (including
> exactly
> > what you are looking for). The help that you are looking for will not be
> in
> > the Vlisp help file, it will be in the landauto-reference.chm file. This
> > help file was written using the VBA syntax, but all the object, methods
> and
> > properties are available in Vlisp (once you add a reference to the type
> > library). If you really want to program in Vlisp, you will have to
> translate
> > the examples from VBA to VLisp. For LDDT, the starting point is the LDDT
> > application object, from there, the current Project, and from the project,
> > you are off and running. Again, look at the examples in the help file for
> > how it is done in VBA, and mimic that syntax. However, I really think that
> > you will make better use of your time if you program in VBA, and then wrap
> > those routines with LISP calls. Not only will you have a wealth of sample
> > code, the VBA editor is far better than the VLisp editor. As an added
> > benefit, you will never have to use DCL again!
> > >
> > > Regards,
> > >
> > > Peter Funk
> > > API Product Manager
> > > Building Industry Division
> > > Autodesk, Inc.
> > >
> > >
> > > "jregier" wrote in message
> > news:f0cf7e3.9@WebX.maYIadrTaRb...
> > > OK, fair enough. But i still would like a (better) LISP function that
> > returns the elevation (or nil if out of bounds) for a point on a surface.
> > Ive loaded the vl com and reactors, and tried the vlisp help. Using
> Roberts
> > suggestion as a starting point,
> > > (vlax-invoke-method
> > > cur_surf
> > > "getelevation"
> > > <
> > > how do i set the cur_surf object - something similar to (setq cur_surf
> > (vlax-get-object ???)).
> > > Jim
> > >
> > >
> >
> >
>
>
*Miller, Bud
Message 16 of 18 (982 Views)

Re:

04-10-2002 10:07 AM in reply to: jregier
> 220, 221... whatever it takes.

Mr. Mom, right? We quote that line all the time.

"Gotta keep that sense of humor, it's critical."

Bud Miller

"John Uhden" wrote in message
news:AF86836B704CC6E93930028B643E964B@in.WebX.maYIadrTaRb...
> 220, 221... whatever it takes.
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> [ mailto:juhden@cadlantic.com ]
> [ http://www.cadlantic.com ]
> 2 Village Road
> Sea Girt, NJ 08750
> Tel. 732-974-1711
>
>
> "Laurie Comerford" wrote in message
news:smileyvery-happy:23FE6436B15A42A05FBE78484AA58ED@in.WebX.maYIadrTaRb...
> > Hi Robert,
> >
> > A VBA equivalent is:
> >
> > Function GetElev (dVar1 as double, dVar2 as double, sVar as string )
> > Dim oDTM as AeccSurface ' o for object
> > Dim dElev as Double
> > Set ogDTM = AeccApplication.ActiveProject.Surfaces.Item (sVar)
> > dElev = ogDTM.GetElevation (dVar1, dVar2)
> > GetElev = dElev ' Return the data to the calling function
> > End Function
> >
> > Sub AnyOldCode ()
> > Dim sDTM as String ' s for string
> > Dim dEast as Double ' d for double
> > Dim dNorth as Double
> > dim dElev as Double
> > ... Other code which will probably establish values for the variables
below
> > sDTM = "Surface1" ' Can be any surface name
> > dEast = 1000 ' Can be any coordinate
> > dNorth = 1000 ' Can be any coordinate
> > dElev = GetElev (dEast, dNorth, sDTM) ' Call the function to get
the
> > value
> > .... any other code
> > End Sub
> >
> >
> > This could be simplified by not using variables to get the data, but in
a
> > real program East, North and sDTM etc would be held in variables:
> >
> > dElev = AeccApplication.ActiveProject.Surfaces.Item
> > ("Surface1").GetElevation (1000,1000)
> >
> > It may be habit, but I find the VBA code easier to follow.
> > As Peter mentioned the sample code for VBA is far more extensive than
for
> > Lisp.
> >
> > --
> >
> >
> > Laurie Comerford
> > CADApps
> > www.cadapps.com.au
> >
> >
> > "Robert Steltman" wrote in message
> > news:7658CF2408FA41638AAFFEDE46D7D346@in.WebX.maYIadrTaRb...
> > > (defun set_up_surfs (/)
> > > ;;;This will get the first surface defined!
> > > ;;;Note there are no error checkers
> > > (princ
> > > "\nCopyright© Robert Steltman Inc.\twww.rsteltman.com\tToll Free
> > > 1.866.260.2514\n")
> > > (vl-load-com)
> > > (setq acadObj (vlax-get-acad-object))
> > > (setq aeccApp (vl-catch-all-apply
> > > 'vla-getinterfaceobject
> > > (list acadObj "Aecc.Application")))
> > > (setq aeccProj (vlax-get aeccApp "ActiveProject"))
> > > (setq surfs (vlax-get aeccproj "surfaces"))
> > > (setq cur_surf (vla-item surfs 0)))
> > >
> > > --
> > > *************************************************************
> > > 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
> > > *************************************************************
> > > "Peter Funk - Autodesk, Inc" wrote in
message
> > > news:0FB83D508561D0CF1692EE14DBC9C08F@in.WebX.maYIadrTaRb...
> > > > OK, Now we're on the same page! You have all the functionally that
you
> > > need using the ActiveX interface to the LDDT object model (including
> > exactly
> > > what you are looking for). The help that you are looking for will not
be
> > in
> > > the Vlisp help file, it will be in the landauto-reference.chm file.
This
> > > help file was written using the VBA syntax, but all the object,
methods
> > and
> > > properties are available in Vlisp (once you add a reference to the
type
> > > library). If you really want to program in Vlisp, you will have to
> > translate
> > > the examples from VBA to VLisp. For LDDT, the starting point is the
LDDT
> > > application object, from there, the current Project, and from the
project,
> > > you are off and running. Again, look at the examples in the help file
for
> > > how it is done in VBA, and mimic that syntax. However, I really think
that
> > > you will make better use of your time if you program in VBA, and then
wrap
> > > those routines with LISP calls. Not only will you have a wealth of
sample
> > > code, the VBA editor is far better than the VLisp editor. As an added
> > > benefit, you will never have to use DCL again!
> > > >
> > > > Regards,
> > > >
> > > > Peter Funk
> > > > API Product Manager
> > > > Building Industry Division
> > > > Autodesk, Inc.
> > > >
> > > >
> > > > "jregier" wrote in message
> > > news:f0cf7e3.9@WebX.maYIadrTaRb...
> > > > OK, fair enough. But i still would like a (better) LISP function
that
> > > returns the elevation (or nil if out of bounds) for a point on a
surface.
> > > Ive loaded the vl com and reactors, and tried the vlisp help. Using
> > Roberts
> > > suggestion as a starting point,
> > > > (vlax-invoke-method
> > > > cur_surf
> > > > "getelevation"
> > > > <
> > > > how do i set the cur_surf object - something similar to (setq
cur_surf
> > > (vlax-get-object ???)).
> > > > Jim
> > > >
> > > >
> > >
> > >
> >
> >
*Uhden, John
Message 17 of 18 (982 Views)

Re:

04-10-2002 11:08 AM in reply to: jregier
Zactly.

My recent favorite is telling the client they have an "ID Ten T" error... "ID10T"

--
John Uhden, Cadlantic/formerly CADvantage
[ mailto:juhden@cadlantic.com ]
[ http://www.cadlantic.com ]
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711


"Bud Miller" wrote in message news:09A9F3CAF567E5CF5399F1C065A0FDF7@in.WebX.maYIadrTaRb...
> > 220, 221... whatever it takes.
>
> Mr. Mom, right? We quote that line all the time.
>
> "Gotta keep that sense of humor, it's critical."
>
> Bud Miller
>
> "John Uhden" wrote in message
> news:AF86836B704CC6E93930028B643E964B@in.WebX.maYIadrTaRb...
> > 220, 221... whatever it takes.
> >
> > --
> > John Uhden, Cadlantic/formerly CADvantage
> > [ mailto:juhden@cadlantic.com ]
> > [ http://www.cadlantic.com ]
> > 2 Village Road
> > Sea Girt, NJ 08750
> > Tel. 732-974-1711
> >
> >
> > "Laurie Comerford" wrote in message
> news:smileyvery-happy:23FE6436B15A42A05FBE78484AA58ED@in.WebX.maYIadrTaRb...
> > > Hi Robert,
> > >
> > > A VBA equivalent is:
> > >
> > > Function GetElev (dVar1 as double, dVar2 as double, sVar as string )
> > > Dim oDTM as AeccSurface ' o for object
> > > Dim dElev as Double
> > > Set ogDTM = AeccApplication.ActiveProject.Surfaces.Item (sVar)
> > > dElev = ogDTM.GetElevation (dVar1, dVar2)
> > > GetElev = dElev ' Return the data to the calling function
> > > End Function
> > >
> > > Sub AnyOldCode ()
> > > Dim sDTM as String ' s for string
> > > Dim dEast as Double ' d for double
> > > Dim dNorth as Double
> > > dim dElev as Double
> > > ... Other code which will probably establish values for the variables
> below
> > > sDTM = "Surface1" ' Can be any surface name
> > > dEast = 1000 ' Can be any coordinate
> > > dNorth = 1000 ' Can be any coordinate
> > > dElev = GetElev (dEast, dNorth, sDTM) ' Call the function to get
> the
> > > value
> > > .... any other code
> > > End Sub
> > >
> > >
> > > This could be simplified by not using variables to get the data, but in
> a
> > > real program East, North and sDTM etc would be held in variables:
> > >
> > > dElev = AeccApplication.ActiveProject.Surfaces.Item
> > > ("Surface1").GetElevation (1000,1000)
> > >
> > > It may be habit, but I find the VBA code easier to follow.
> > > As Peter mentioned the sample code for VBA is far more extensive than
> for
> > > Lisp.
> > >
> > > --
> > >
> > >
> > > Laurie Comerford
> > > CADApps
> > > www.cadapps.com.au
> > >
> > >
> > > "Robert Steltman" wrote in message
> > > news:7658CF2408FA41638AAFFEDE46D7D346@in.WebX.maYIadrTaRb...
> > > > (defun set_up_surfs (/)
> > > > ;;;This will get the first surface defined!
> > > > ;;;Note there are no error checkers
> > > > (princ
> > > > "\nCopyright© Robert Steltman Inc.\twww.rsteltman.com\tToll Free
> > > > 1.866.260.2514\n")
> > > > (vl-load-com)
> > > > (setq acadObj (vlax-get-acad-object))
> > > > (setq aeccApp (vl-catch-all-apply
> > > > 'vla-getinterfaceobject
> > > > (list acadObj "Aecc.Application")))
> > > > (setq aeccProj (vlax-get aeccApp "ActiveProject"))
> > > > (setq surfs (vlax-get aeccproj "surfaces"))
> > > > (setq cur_surf (vla-item surfs 0)))
> > > >
> > > > --
> > > > *************************************************************
> > > > 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
> > > > *************************************************************
> > > > "Peter Funk - Autodesk, Inc" wrote in
> message
> > > > news:0FB83D508561D0CF1692EE14DBC9C08F@in.WebX.maYIadrTaRb...
> > > > > OK, Now we're on the same page! You have all the functionally that
> you
> > > > need using the ActiveX interface to the LDDT object model (including
> > > exactly
> > > > what you are looking for). The help that you are looking for will not
> be
> > > in
> > > > the Vlisp help file, it will be in the landauto-reference.chm file.
> This
> > > > help file was written using the VBA syntax, but all the object,
> methods
> > > and
> > > > properties are available in Vlisp (once you add a reference to the
> type
> > > > library). If you really want to program in Vlisp, you will have to
> > > translate
> > > > the examples from VBA to VLisp. For LDDT, the starting point is the
> LDDT
> > > > application object, from there, the current Project, and from the
> project,
> > > > you are off and running. Again, look at the examples in the help file
> for
> > > > how it is done in VBA, and mimic that syntax. However, I really think
> that
> > > > you will make better use of your time if you program in VBA, and then
> wrap
> > > > those routines with LISP calls. Not only will you have a wealth of
> sample
> > > > code, the VBA editor is far better than the VLisp editor. As an added
> > > > benefit, you will never have to use DCL again!
> > > > >
> > > > > Regards,
> > > > >
> > > > > Peter Funk
> > > > > API Product Manager
> > > > > Building Industry Division
> > > > > Autodesk, Inc.
> > > > >
> > > > >
> > > > > "jregier" wrote in message
> > > > news:f0cf7e3.9@WebX.maYIadrTaRb...
> > > > > OK, fair enough. But i still would like a (better) LISP function
> that
> > > > returns the elevation (or nil if out of bounds) for a point on a
> surface.
> > > > Ive loaded the vl com and reactors, and tried the vlisp help. Using
> > > Roberts
> > > > suggestion as a starting point,
> > > > > (vlax-invoke-method
> > > > > cur_surf
> > > > > "getelevation"
> > > > > <
> > > > > how do i set the cur_surf object - something similar to (setq
> cur_surf
> > > > (vlax-get-object ???)).
> > > > > Jim
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
>
>
Contributor
jregier
Posts: 23
Registered: ‎05-22-2009
Message 18 of 18 (919 Views)

error: Civil 3D API: Triangle is deleted

03-02-2013 07:59 AM in reply to: jregier

With help, developed a function to extract an elevation from a surface (or selected surfaces from a list).  It's worked fine until C3D2012 and now with the change in format I need to get it working again.

 

I'm getting error: "Civil 3D API: Triangle is deleted" for points outside the extent of the surface in my sub-function

(setq n

   (vlax-invoke cur_surf 'FindElevationAtXY (car pt) (cadr pt))   )

 

It used to simply return nil without crashing and I could handle the nil value in a number of ways and continue to the next point.  I use the function in a number of routines attached directly to Access databases for modelling grids and correcting elevations of fields in a number of large database sets.

 

Any advice on working around or other vlax function needed to check the xy coordinate to the surface is much appreciated.

 

 

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

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