AutoCAD Civil 3D :: Change Point Label Style Using AutoLISP
Oct 2, 2013
I did some search and got some code from 2009 post which not really working for me. Since I am not a pofr for autocad civil3D and just staring to learn how programing with autolisp, I am having trouble to debug the code:
(defun xp()(setq sset1 (ssget "X" '((0 . "AECC_PARCEL_SEGMENT")))) (COMMAND "EXPLODE" SSET1 "")
if (= (setq ss (ssget "X" '((0 . "AECC_COGO_POINT")))) nil)
(setq ss (ssget "x" '((0 . "AECC_COGO_POINT")))) );
FILTERS UNCLOSED POLYLINES(defun c:changestyle()
(setq xlabel (vlax-ename->vla-object (car (entsel))))
I am trying to use autolisp to change the point label style in autolisp. Mostly teach you how to do it manually, I not sure there is a way to do it in autolisp.
Is there a way to set up a custom Point Label Style that will change the text color if the information entered meets particular criteria? I will be entering sample measurements taken on two (2) different dates, but if the sample data is greater than 1.0, I want it to show up a different color.
I am trying to change the default label styles for AddSegmentLabel under general styles using .NET...
Dim X As Autodesk.Civil.Settings.SettingsCmdAddSegmentLabel = CD.Settings.GetSettings(Of Autodesk.Civil.Settings.SettingsCmdAddSegmentLabel)()
X.Styles.LineLabel.Value = strChildStyleName ... says name does not exist
or
X.Styles.LineLabelStyleId.Value = oidChildStyle ... "The type of objectId is wrong"
If I manually change it to a child style and then check the values, they are the same as what I'm trying to set them to. If you use a "parent" style then these both work. Am I doing something wrong or this another limitation?
Civil 3D 2013 - Windows 7 Pro 64 - Dell T3500 - Xeon 2.67 - 24gb - Quadro 600
The label associated to a grading point when is moved when is moved changes its size automatically and a leader appears. After this happen no control over the grading point and its associate label. refer to the image below.
I'm using AutotCAD Civil 3D 2012 in the Civil 3D workspace, trying to create a point label style to show what I need it to show. I click on a point and select it's properties. Once on the properties tab I go down to the point label style box and clicked on the down arrow. A list of options then comes up and I selected the create/edit option. A small point label style box then appears and i choose the button directly next to the drop-down list and the label style composer box pops up. In this box I go to the layout tab and then go down to the contents box. I select the browse button next to the contents to select the contents. I select the contents I want but when I apply it every point has those contents and I need just that one point to have those contents.
Imported points and I have a label style to label tree sizes automatically, but when there are many trees near each other labels start to overlap. So I will typically rotate the label style 180 degree or drag the label, but I am curious if its possible to have label always stay horizontal no matter what my rotation angle is.
Civil3D 2013 Windows 7, 64 bit Intel i7 2600 @ 3.40Ghz 16 GB RAM Nvidia Quadro 600
i have a building corner point label style that labels the corner of bldgs with the elev on top of an arrow and the full description of a bdlgc on bottom of arrow...rotated at 45 degrees....
i have 3 components...a block of an autocad leader i call an arrow that i just drew from left to rt on layer 0 and named the component arrow...then i have the elevation and the description
problem is that when i rotate label to move it out of way of obstructions it flips the elev on bottom and the desc on top!!
i have tried a number of combinations of anchor pts and changing the "flip anchor pts with text" to true/false under the general tab of the label style composer...
Point label styles do not scale properly in raster plots. Raster plots have long been my fix for making wipeouts and masks behave. Without the excellent fix raster plots have been, I'm sunk! All of my work depends upon raster plotting to maintain consistently correct output with absolutely no wipeout or masking errors. My point label styles all have a text height of 0.11" which is the plotted height according to the documentation. They are exactly the right height in all page setups with non-raster plot devices. But, when my page setup includes a raster device the text is scaled to just a speck. It should be 32 pixels high at the 288 pixels per inch I have specified but it is barely two or three pixels high both on my display and in my ploits.
The attachments show the wipeout/mask problem in 2012 DWF output and the rescaling of point labels in 2012 raster (TIFF) output. I am in critical need of a fix that does not involve special point label styles just for raster plots. Autodesk!? I already have to use a special pen tables for raster plots with pens sizes scaled for each dpi resolution I use but that has been settled for many years now.
I have set the default style for the drawing to a certain style by going to toolspace - settings and right clicking on point and clicking on edit feature settings ...under default styles i set it to the one I want for both point style and point label style......how come when I create a few manual points and then go to the prospector tab and right click on _all points, the point label style is not set to the default one I set it to as I described above? The points are not coming in the way I want them to?
I am having trouble drilling down to the object that contains the point label components. Specifically, I would like to access values such as Anchor Component, Anchor Point, Text Height, X Offest, and Y Offset for the various components of the Point Label Style. I am able to get the Point Label Style by name (object dump below) but I don't know how to get at the components that I want to work with.
I'm a bit new to the concepts of point labels in C3D; I browsed around for a bit for a solution and haven't been successful. I'm having troubles with my point label styles in Paperspace - they appear about 25x smaller than in model space, but both are the same scale.
This is my label style setup:
This is how it appears in modelspace:
This is my viewport settings and how it appears in paperspace (zoomed in):
The text height in MS is 2mm, and approx 0.078mm in PS.
I have Civil 3D 2013 and would like to define the station tick marks. Unfortuantely, the only style that appears on the Import pull down is "Standard". How do I go about downloading or loading from an appropriate program folder the "Tick" style set?
I am tring to change the label visibility of a point label style ,not sure it can be done, I search around for a bit I can seem to find anything useful...
C3D 2013. We have profile line labels, some of which get manually edited (for example, change the "<[Tangent grade(FP|P2|RN|AP|GC|UN|SD|OF)]>" to a static number such as 0.29%).
However, if you CTRL+Click and select one of these labels and change the style of that one label, then the manual edits are lost and the label reverts back to the default string.
Using Civil 3d2012, Is it possible to change the alignment label style set after the alignment has been created? For example, for an alignment that was created with alignment label set X - change the label set to alignment label set Y? It seems like this should be pretty easy, I must be missing something obvious.
How to set a default point style for point groups? Whenever I import survey points, I always put them into their own point group, so I can display each day's worth of survey data differently. For some reason, the point style always defaults to a certain style (our control point symbol). I'd like it to default to Basic, so I don't have to change this every time. Is it a template drawing setting somewhere?
I have applied a client's style to the alignment to show PI's. In this case we have 2 alignments close to each other (NB & SB of road). PI's close to each other will then overlap. What I would like to do is apply a style that will have the line and text go exactly in the opposite direction. I am trying to avoid dragging the text as that seems to bring up several more issues. I am looking for whatwhere to change within the style editor to make this happen.
C3D 2012 sp1 W7Pro 64bit HP Z400 Workstation 16 GB RAM Intel Xeon CPU W3565@3.20GHz NVIDIA Quadro 4000
Is there a way I can add a macro or formula in a label style definition?For instance, I'd like to show the difference in elevation for the ends of a line and whether it's a cut or fill without having to do everything manually.
I was trying to find a way to not have the last ending Station Label show up on my centerline is there a override or way to tell it to just label to the last 100 or 50 foot station?
I have created a Parcel Area Label Style in code, and also added a text component to the style. The point in adding a text component was to expose a Parcel UDP on the label, but the text component does not display as expected (read: as it displays when the same thing is done in the GUI).
I set the LabelStyleTextComponent.Text.Contents.Value to the same string as I get when I add the Parcel UDP to the text component in the GUI (from the Properties-drop down in the Text Component Editor), but the label then just displays the "template", e.g. "<[My UDP(CP)]>", exactly as it shows in the Editor. When the style and text component is added through the GUI, the label correctly displays the current value of the UDP "My UDP" on the Parcel.
If I go into the Text Component Editor after having added the area label style and it's text component through code, and add the same UDP to the text component (so that it stores the UDP twice), then the label correctly displays the UDP value twice on the Parcel (!). That is, Civil then suddenly realizes it's a UDP.
I want to modify the default Profile Grade Break label style that comes with the product as I don't want the line component in the style. When I delete the line component I have to reconfigure the attachment points of the remaining components. I want the marker to attach to the feature, then the PVIS to the marker, then the PVIE to the PVIS. The problem is these components are in the wrong order in the style and thus I can't get the PVIE to be left aligned with the PVIS. There apparently is no way to re-order the components in the style. The only solution seems to be to delete and recreate them in the proper order. Is this the case? If so then there defintely needs to be an enhancement in the product to change the order.
Infrastructure Suite/C3D 2013, LDT 2004, Power Civil v8i SS1 WIN 7 64 PRO HP Pavillion h8xt, i7 2600, 12 GB RADEON 6450, 1 GB
In C3d2011 I cant seem to change my contour label style from STYLE A to STYLE B. Seems I used to right click and change it from there but that oprtions not available?
I am looking for a Line Label Style Expression which will perform a rounding function on distance labels that display my "General Segment Length" value.
What I need is to be able to remove "Trailing Zeros" from my distance values, so that if precision is set to say 0.01 and my distance value is measured as 45.5, I do not get 45.50 but 45.5.
Is there a way to label the low point of a profile or alignment that doesn't have any vertical curves? We have an existing alignment and profile which is relatively flat, and we'd like to establish and label the low points for drainage improvements.
Civil 3D 2011, updates installed - I have a user who is manually importing points into his drawing. He has set the default label style in his command settings to a specific style, but no matter what he does the points come in with the previously set default style (the out-of-the-box label style). We've tested this in a new drawing with the same results. We've tested this on several computers with the same results.
My initial thought was that something on the network was holding this setting somehow. We disconnected his computer from the network with the same results.
how to create a label style for design center of road (simple tangent) in profile that will work between multiple profile views. I've used the 'Create Multiple Views' profile view wizard. I use a horizontal dimension style label for CL road (looks just like an autocad linear dimension). I'd like the label work across separate views i.e. stop at view end, pick back up at view start.
The label I currently use is simply a line component from tangent start dimension to tangent end dimension and the text component is anchored to the line midpoint. Label looks as intended for normal use. For some reason the line drops as if looking for the actual pvi at the right side when i use multiple views.
We are upgrading from LDD2008 to Civil3D 2013. I'm working on a Civil3D template
I'm setting up line and curve label style. Oringally we were going to have one set of line label style. Ex. Bearing Above or Bearing Below. After seeing that the line labels does not look at the current text style we decided to make copies of the original label styles based on Text Styles.So now I have Bearing Above60, Bearing Above100, etc. I named them based on the Leroy styles and sizes.
After editing each one and changing the Text Style each one looks at, it is not using the Texting Style i assign it. I'm doing this in the General Tab and Text Style for each label style.
i guess I should have tested before creating all them to find out it didn't work.Does it need to be done somewhere else or is do I have to do something with the overall label style overrides?
Cannot delete label style component. This is for line annotation labels.
I created a child BRG-ONLY from a BRG-DIST and it will not allow me to delete the distance component. The red X is faded and not clickable.
This is my second day with a new company, and when somebody else created a similar child style apparently they could not either. The just made the distance component invisible... which I guess works almost as well.
How would I be able to pick a specific component to make sure I can delete it?
i've got a bunch of points that need a coordinate label. my drawing is on a state plane coordinate base but i want the point labels to be on an artificial coordinate base. i basically need to start in the corner of a parking lot at 0,0 and work my way out from there with the coordinates based on that 0,0. Is this a possibility?
Dell Studio XPS 9100 Intel Core i7 CPU 930 @ 2.8GHz 12GB Ram 64 bit C3D 2012 SP3.0