AutoCAD Civil 3D :: Sample Line Name Duplicated Exception
Dec 23, 2013
In Civil 3D we can create several new sample line groups and their sample lines can have the same name in other sample line groups.e.g
SLG_1:
Sample line names:
1
2
3
4
SLG_2:
Sample line names:
1
2
3
4
However, If I create a new sample line group with API and after new sample lines, if other sample line name(of other SLG) has the same name, Civil 3D throws Exception.
I have a road corridor and need to create sample lines at a 50m interval, as well as at every horizontal and vertical turning point. While the 50m stations and the horizontal turning points are easy to add (using the alignment), I can't seem to find where/how to add the vertical points (they have to be extracted from the profile).
Running the Feature Line Report I noticed the horizontal turning points are not used in the report: it only reports the 50m stations (so I guess the same will happen to the vertical points?).
how to add the vertical turning points to the sample line group and how to include both horizontal and vertical points in the Feature Line Report.
I am trying to use object snap (intersection) to position the end of my sample lines at the intersection of the sample line with a polyline. The object snap works with sample lines left of the alignment centerline but not on the right. How do I correct this?
I draw an alignment for road. I turned off design criteria and i used data from manual for my country Slovenia. I need spiral in, curve and spiral out on alignment. Finally i got that alignment. Then i insert sample lines along the alignment. Then i saved autocad civil 3d file and shut down the program. When i reopen file, i see that sample lines after the spiral in being erased. Sample lines stayed along first tangent, after that they were erased.
Creating sample lines at a specific increment within a range starting from the start of the range is impossible unless the start of the range is divisible by the increment. This is a defect that needs fixing.
Meanwhile you'll find me typing in the 93 locations for my sample lines. I believe this is what we made computers for.
I have some sample lines that highlight utilities needing a section view. I've now moved my sample line to highlight the true cross section stationing for these crossings. Why doesn't the station value update for the sample line once this is moved. For some reason I remember the station text on the sample line updating itself automatically in the past.
I am trying to figure out how to change the labeling of my sample line style from (<[Sample Line Number(Sn)]> which out puts a count of 1,2,3,4 etc to output A,B,C,D etc.
I'm working on cross sections and ran into a problem. I had to edit my surface but it wouldn't cooperate with me. So instead, I just erased the whole surface and restarted it. After I got my surface the way I like it, I added my sample lines to where they are supposed to be. Problem is, my cross sections turned out blank.
So for now, I skipped to create a surface profile and see both of my surfaces available on the bottom. The old one I deleted and the newly created one. It won't let me go to the bottom and erase the old deleted surface. When I go into my toolspace-prospector....it only shows my newly created surface and nothing more. Is this a reason why my cross sections come up blank?
I'll show you a pic of my toolspace with just the current surface and another pic of the "create a surface profile" showing that it still has both the old and new (all in CAPS) but it won't let me delete the original.
HP Compaq 8100 Elite Win 7 Pro SP1 - 64Bit 8GB RAM i7 860 @ 2.80 GHZ AutoCad Civil 3d 2012 SP1
Where is the setting for the sample line label background mask? I have some sample lines that will be plotted on top of an aerial photo, and the black box background looks terrible. I'd like to turn it off. I found the contour label background fine and I switched those to False without much of a problem, but I can't seem to locate the ones for the sample lines.
I'm working on a stream restoration project and we need to determine the x coordinates and corresponding elevations along a stream alignment at certain sample lines. The centerline of the stream's alignment has been created as well as sample lines for cross sections at 50' intervals. We need the coordinates & elevations of each sample line (cross section) exported into an excel/txt document.
For instance, at station 1+00 of the alignment we have a sample line. We need to know to the right and left along that sample line the corresponding elevations and that x coordinate) from the alignment. Primarily, whole contour intervals but more information would be useful as well. I was hoping this could be automatically generated.
I create the sampleline on the option "by a range of stations" so the sample lines were created on the horizontal geometry points. When I change the geometry of the alignament, the sample lines's local change or I need to do the process all over again?
Bring that back from the archives... because I am still very fond of redoing hundreds of cross sections because you're incable of redistributing the graphs when a sample line is added to a an existing group... and blow up all of the projections well done.... way to leave out a super critical dynamic component.
PPD E P I C F A I L
There is some unbelievable gaps in the software but how do you let this one go on for so long?
Dell Precision T3500 - Xenon W3550 @ 3.07 (4 core) Ram @ 12Gb 64bit Win7 Pro Samsung SSD NVIDIA Quadro 2000 - Dual Monitors Cat 6 network with GlobalScape Avail Agent - WAFS Infrastructure Design Suite Premium and Civil 3D 2012
I made an alignment of road, inserted with sample line, then i made a profile. But on the sample line on profile, there is not a data of height and lenght of profile. How to get those data in road profile. I can manually draw that, but i think there is an easier way?
I have a corridor with an associated sample line group, and I have produced some material volume tables to give me quantities for my corridor structures and cut/fill volumes. When I look at the material volume tables they are at a seemingly arbitrary stationing. The sample line group which the material volume tables are (supposedly) based on are on alignment L1000 and they run from station 1133+73 to station 1154+00 every 10 meters. The material volume tables show volumes broken down by stations starting at station 3719+58.66 and runs through to station 3786+08.92. It is sampling at a seemingly arbitrary frequency, there is absolutely no alignment in my drawing that has stations remotely resembling those numbers, and there is definitely no sample line group it could be using that samples an alignment or stationing anything like that shown in the materials volume tables. Here is a quick screenshot of what my material volumes tables look like:[URL]
I started with a points file which I created an existing surface called EG. I then used a number of feature line to create the gradings, grading surfaces and associated volume surfaces (compared to EG) also had other drawing elements and aerial photo in place. I had a lot of grading scenarios to do and it was all in one file. It was getting out of hand, so I duplicated the file, deleted the gradings (retained the EG surface) then added another set of new gradings and volume surfaces against EG. I did this in 4 files. So now I have multiple files that contain duplicates of the same EG surface and other features, but have unique gradings and surfaces referenced to those individual EGs.
Files all have similar structure:
+Various features (duplicated in all files)
- base aerial photo
- other drawing elements
+Surfaces
- EG surface (duplicated in all files)
- Grading A-1 surface
- Grading A-2 surface
- Grading A-1 volume surface
- Grading A-2 volume surface
+Site A
- Grading A-1
- Grading A-2
I recognise now that I should have data shared the EG surface from 1 file (and xrefed the other common drawing elements??) but given my situation now, what is the recommend way of putting it all together?
How I could use on of the sample Civil 3D API that is provided? In particular, I would like to use the Export to Excel Sample API provided at the following location during the install:
C:Program FilesAutodeskAutoCAD Civil 3D 2013SampleCivil 3D APIDotNetCSharpPipeDataExcel
I am not a programmer and can not just load this sample as it is a .cs file. How would I go about using the code already provided to create a plugin into my AutoCAD to be able to use this command?
I'm trying to create sample lines at sta. 0+58, 1+08, 1+58, 2+08......................
My alignment begins at 0+00.
In the Create Sample Lines - By Station Range I set the From Alignment Start?end both to false and set the start and end stations as 0+58 and 20+58 respectively. The 0+58 sample line plots at 0+58 but the rest of the sample lines plot at even 50' stations (1+00, 1+50...).
how to create a new sample line group and a new sample lines within that slg: URL....I have checked what is the default sample lines width (create sample lines command):
But how can I put these values (left width and right width) for a new sample line?Sample line class doesn't have "left width" or "right width" property ¿? Do I have to create a new vertex? However I think that I can´t add new vertex in vertex collection.
I am creating code based on the 2011 styles sample. I converted it from C# to VB, but it will not run correctly. Did something get screwed up in the conversion that I am missing?
Private Shared Sub ListCollection(ByVal objectType As Type, ByVal pf As PropertyInfo, ByVal myStylesRoot As Object, ByVal styleList As ArrayList) Dim res As Object = objectType.InvokeMember(pf.Name, BindingFlags.GetProperty, Nothing, myStylesRoot, New Object(-1) {}) If res.Equals(Nothing) Then Return End If [code]....
How or if you can add sample lines to a specified group? I created a group only to realize that there are some specific stations I need. I do not want to re-create the group and re-assign the materials nor reproduce my volume reports. I just want the section plotted on my sheets.
How can I sample more sources in my profile view? I added a new surface that I want to see on my profile, but it doesn't show the "sample more sources" option like the sections do..
I have an Object ARX application where I consult a TIN surface for elevation samples. I need several thousand point's elevations in a straight line.
I have the surface declared as
CComQIPtr<IAeccTinSurface> mTINSurface;
And given coordinates (x,y) I can easily and successfully find the elevation using
//x and y are given double valuesdouble z;HRESULT result = mTINSurface->FindElevationAtXY(x, y, &z); //+error treatment
This, however, takes a lot of time when I have to do it thousands of times inside a for-loop varying the x-coordinate. Reading the documentation on IAeccSurface I found the Sample Elevation method (I don't paste the link here, it's pointing to 'invalid HTML' and forbidding me to post). In the hopes of improving performance, this is what I tried:
SAFEARRAY* safearray;SAFEARRAYBOUND bound;bound.lLbound = 0; //zero-basedbound.cElements = number_elements; //does this define the number of samples?safearray = SafeArrayCreate(VT_I8, 1, &bound); //zero based, safe array of X,Y,Z doubles CComVariant variant(safearray);variant.vt = VT_ARRAY | VT_I8; //type: safe array of doubleHRESULT result = mTINSurface->SampleElevations(x,y,n_x,y,&variant); //sample in line
This is what I took from the description given by the documentation; that the last parameter should be a "VARIANT containing a zero based, one dimensional safe array of X, Y, Z values. ". My problem is that 'result' is always E_FAIL - and I'm not sure why - and 'safe array' is filled with zeroes.
I have the following questions:
Am I passing the right parameters? I have little experience with VARIANT and SAFE ARRAY types.Does the entire Sample Elevation operation fails whenever a single elevation cannot be found? (I have sections without elevation information in the surface - I'm sure the first point (x,y) DOES have a valid elevation value, though). Would I really see performance gain by using Sample Elevation instead of multiple FindElevationAtXY, as I assumed?When calling Sample Elevation, I'm not entirely sure how the sampling is considered. Does the method recognize the size of the array and divides the distance between the initial point and ending point equally, resulting in that many samples?
I have an ObjectARX application where I consult a TIN surface for elevation samples. I need several thousand point's elevations in a straight line. Initially, I was making thousands of FindElevationAtXY calls, but that proved to be somewhat slow, so I searched and found SampleElevation in the documentation and was hoping it'd provide me with performance gain.
I had some problems, due to my inexperience with VARIANT and SAFEARRAY types, but now I get what seems to be correct results when passing an initial and ending point. Here's a code snippet of my call, which succeeds and gives me the correct elevations;
HRESULT result = mTINSurface->SampleElevations(x,y,n_x,y,&variant); //sample in line
Note that I'm sampling a line along the x-axis (y constant).
The problem i'm facing is that the number of samples along the line provided by the method is far smaller than I expected. I need thousands of points along this line (in fact, I want all points with exact round x-coordinates), and no matter what size I provide for the safe array of doubles given by 'variant', I get only a few hundred points. Furthermore, I've checked and the offset between any two points in the resulting sample is not constant, nor are they the same when I sample a different line (increase y coordinate by one).
Here are my questions: Why are these points chosen by the method - I mean, are they chosen because they are somehow 'significant'?Is there a way to specify the number of points I want along this line?Would it be at all possible to determine a constant offset for the samples (i.e., I want coordinates at specific points x-units apart from each other)?