Jump to content

Creating custom label


jcrayford

Recommended Posts

Hello all,

 

I'm trying to dreate a custom label within Civil3D 2010 to dimension a line with a bearing and distance. The line itself is drawn at Grid distance, but must be annotated at Ground distance, using a custom scale factor OR the Grid Scale Factor used under the drawing settings.

 

I have a LISP that will place a variable in the drawing called "userr5", in which the operator will input the scale factor. I've also set the Grid Scale Factor, but can't seem to find where that's stored within the CAD file.

 

My problem is that when I create a custom Line Label, I can't get it to use either the custom "userr5" variable for a calculation within the Line Label OR the Civil3D set Grid Scale Factor....

 

Has anyone had experience with customizing labels and getting them to work in this fashion?

 

Thanks in advance....

 

J.

 

EDIT: Sorry, I should have shown an example... here's what the label is trying to do:

*"userr5"

Link to comment
Share on other sites

If your ground distance factor is a constant then...

In Toolspace settings - General - Label Styles - Line - Expressions

Right click on Expressions to create a new one and then modify your label style.

Link to comment
Share on other sites

  • 1 year later...

That's the solution we're using, but the headache is remembering to update the number in the expression when starting drawings. There doesn't seem to be a way to get the label to read *userr5*, but is there a way to get lisp to update the expression automatically?

Link to comment
Share on other sites

Wow! Thanks for reviving an old thread....

 

We went away from using the Civil Grid factor input.... We now use custom LISP routines for labelling our lines at ground distances and the custom LISP routines are utilizing the *userr5* variable that is set when starting up a drawing... The nice thing about the *userr5* variable is that it's drawing specific; you set it once in a drawing and it remains there and active even after you shut down the drawing and come back in....

 

If only there was a way to use the Civil Grid factor.....

 

J.

Link to comment
Share on other sites

  • 2 weeks later...

Autodesk flat-out doesn't understand this problem. I've even taught the underlying theory at AU, and they STILL don't get it.

 

I'm frustrated as hell about it. I hope there are A LOT of other users that are similarly frustrated, because then maybe Autodesk will finally fix the problem. But they only fix problems if LOTS OF PEOPLE complain, so I hope anyone who's ever experienced this problem will file a complaint with Autodesk.

 

I'm thinking of teaching this course AGAIN at AU 2012, and hopefully Autodesk will pay more attention (especially after I've been on the ACSM radio show, as well as have this paper:

 

http://ejsurveying.com/Articles/Working_with_Grid_Coordinates.pdf

 

that is getting about 250 downloads per week). But who knows... Autodesk has been notoriously unresponsive, even to its most-valued users... One of the things I keep complaining to them about VERY VOCALLY... I don't care how big they are... They should STILL pay attention to their customers, as opposed to their stock-holders. After all, if they lose their customers, their stock-holders will be SOL...

Link to comment
Share on other sites

  • 11 years later...
On 27/03/2012 at 11:17, jcrayford said:

Wow! Thanks for reviving an old thread....

 

We went away from using the Civil Grid factor input.... We now use custom LISP routines for labelling our lines at ground distances and the custom LISP routines are utilizing the *userr5* variable that is set when starting up a drawing... The nice thing about the *userr5* variable is that it's drawing specific; you set it once in a drawing and it remains there and active even after you shut down the drawing and come back in....

 

If only there was a way to use the Civil Grid factor.....

 

J.

@jcrayford I'm actually impressed how similarly minds work sometimes. I have developed a lisp routine to define the combined scale factor in the drawing, using "USERR1" as my variable. I have been trying a host of syntax to update my expression automatically  - {General Segment Length} * (1/"USERR1"). I'm not sure this is possible though. I am wondering if you are willing to share your LISP routine to update the scale factor in your labelling as I can't think of another way to pull it off. 

Local Variable in Drawing:

image.png.2e2ec9cf12e94077e051e82a5a383f5e.png

 


 

Expression for scaling ground distance:



image.png.b8cb6c4458f984cd3da1d97c45b2a83e.png

Link to comment
Share on other sites

I was working on this same issue recently. As far as I can tell, there is no way to apply vertical exaggeration to labels. So Sinc's observation from 2012 is still valid. My ultimate solution was to create an expression and hard-code the scale into it.

  • Like 1
Link to comment
Share on other sites

Rather than use the User functions I have gone to Ldata much easier and can save reals, strings etc as you use a key and a value. 

 

(vlax-ldata-get "AlanH" "Layoutname") ; "Alanh" database name  "Layoutname" key name

(vlax-ldata-put "AlanH" "Layoutname" ntitle)

 

Error message (getvar "Userr1")

  • Like 1
Link to comment
Share on other sites

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