Jump to content

Recommended Posts

Posted

Hey - I am new to lsps and trying to figure out this issue I've been running into. 

 

Problem

I'm running into a consistent limitation while trying to automate the placement of surface spot elevation labels via AutoLISP using the ADDSURFACESPOTELEVLABEL command. I have a list of points that I want to have surface spot elevation labels on but I can't seem to figure it out. I currently have a lisp that works only if there is one surface in the drawing folder which is a pain. 

 

What I'm Looking For:

Is there any way to automate the placement of multiple ADDSURFACESPOTELEVLABEL calls without Civil 3D prompting the user to pick a surface every time — even when multiple surfaces exist?

Even a workaround that allows the surface to be locked in for the session or forces it in the background would help.

 

Simplified Example:

Here’s a simplified test block showing how we’re currently trying to use the command:

(setq ptList '((100.0 100.0 0.0) (110.0 100.0 0.0) (120.0 100.0 0.0)))

(foreach pt ptList
  (command "ADDSURFACESPOTELEVLABEL" pt "")
)

Again, works great with one surface. Falls apart with multiple surfaces due to the command always prompting for surface selection — which breaks automation.

Posted

I tried that last year. It wouldn't take a text string, a surface identifier, a surface object name, or anything else I could think of. It's like they don't want you to use AutoLISP with Civil 3D.

Posted

Hi
Can you attach a sample drawing?
It will make it easier to understand your problem.

Posted (edited)

In any case: it seems likely that the ADDSURFACESPOTELEVLABEL command needs an active surface to work. This has its reason because what this command does is calculate a Z coordinate for a given X,Y position and in order to calculate that coordinate it needs to have a surface underneath.

Edited by GLAVCVS
Posted (edited)

I use a toolbar with CIV3D to set the surface properties starting with turn a surface on and set its style say TIN triangles. Yes has off option. It saves having to go to Toolspace, works with multiple surfaces. The code could be used to get a surface name. Will see if can test something, I use Bricscad these days, so not a quick test.

 

AlansContours.png.d93822c840ae83075c1941eb0fee256c.png

Edited by BIGAL

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