Author Topic: CivilLabels converting ?  (Read 4804 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4095
  • C3D user & customizer
Re: CivilLabels converting ?
« Reply #15 on: November 16, 2012, 09:44:20 AM »
Mainproblem is how can I rotate fast labels so they display correctly direction in planview.
While not quite as quick as the rotation of attributes, but definitely quicker than individually rotating labels, rotate one in the normal fashion with the grips. Go to the properties palette, copy the rotation value, now select the other points to rotate, paste the rotation value in the properties palette. Or, this could be automated with lisp or .NET.

Second thing is if I want interpolate between labels I need a value to can calculate new interpolated value. The point is sometimes I work faster if I generate mainhight from new road with surfacespotlevelLabel and interpolate more hight where I need.
I can do this with a blockattribute but not a label. So I believe it must be a methode to can ask a label which value it haves in surfacehight.
I'm not quite following you on this one. Although I think you could use points and the set point(s) by interpolate command. Also, instead of getting the label text, you CAN get the surface elevation at a location. I'll see if I can throw some code together to demonstrate this. Although, if the labels use any expressions, this method would not work very well.


mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: CivilLabels converting ?
« Reply #16 on: November 16, 2012, 09:55:51 AM »
all of this can be done with normal C3D labels and or using a different method

I teach an 'interpolation from corridor surfaces in most of my classes

Be your Best


Michael Farrell
http://primeservicesglobal.com/

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: CivilLabels converting ?
« Reply #17 on: November 23, 2012, 02:06:44 AM »
Is there any way to ask from a vla-object, if I inspect with vlide a SurfacLevelLabel what value it haves for surface "12.53" ?

Jeff_M

  • King Gator
  • Posts: 4095
  • C3D user & customizer
Re: CivilLabels converting ?
« Reply #18 on: November 23, 2012, 09:57:51 AM »
No, not directly. You can use normal lisp selection and (osnap) to get the insertion point information:

Command: (setq selection (entsel))
Select object: (<Entity name: 7ffff642150> (-470.441 -117.361 0.0))
Command: (setq pt (osnap (last selection) "_ins"))
(-471.302 -117.276 12.5304)

You may be able to select the object without user interaction by getting the bounding box, although I'm not sure how reliable that would be.

Starting with C3D2012, the .NET API has a Property for label objects called AnchorInfo from which you can get the Location (Insertion point) of the label. However, this is not exposed to the COM API which can be used by lisp. So you need to use either unreliable trickery in lisp, or move to .NET.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: CivilLabels converting ?
« Reply #19 on: November 23, 2012, 01:33:47 PM »
Thanks Jeff, that I was thinking too. I need little time :laugh: to learn program in the NET.API.
It´s a lot stuff for beginner but it´s really fun to use C#. Is it not so popular to program with API, there is pretty much documentaded :|

mac0312

  • Mosquito
  • Posts: 13
Re: CivilLabels converting ?
« Reply #20 on: November 30, 2012, 12:26:35 AM »
I´m no expert with Visual so I wondering how I can get entitydata from VLA-object ?

This may help in that respect:
http://lee-mac.com/entitylist.html

I can not connect to this website, I do not know why? Thanks!

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: CivilLabels converting ?
« Reply #21 on: November 30, 2012, 07:43:43 AM »
I´m no expert with Visual so I wondering how I can get entitydata from VLA-object ?

This may help in that respect:
http://lee-mac.com/entitylist.html

I can not connect to this website, I do not know why? Thanks!

As far as I know, my site is up and running.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: CivilLabels converting ?
« Reply #22 on: November 30, 2012, 08:22:19 AM »
Worked for me this morning.
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.