Ad

Wednesday, September 09, 2009

Create Detached Surface

Back in April I did a post urging people to stop exploding grading objects. Today I noticed an easier way to create a detached surface.

image

Use the Create Detached Surface on the Grading Creation Tools. Select the button and then the grading group. A surface based on the grading group will be created. Much easier than the way I blogged about before and giving you less of a reason to explode grading objects.

Tuesday, September 08, 2009

"I’m Giving it Away" – Results

It took me a while to put all of the names in the hat, but Wendy Miller gets the book. It was close, she only had a one on one chance of having her name drawn. Wendy please Email me with your mailing address so I can send you the book.

VBA IntersectPointWithSurface

In the Civil 3D API it is possible to find an intersection with a surface at a point. To use the method uses a start point and a direction from the point. The direction is a vector. The key to using the code, which took me a while to figure out, is to create an array of doubles, give them the values and then assign the arrays to a variant.

        Dim vStartPoint As Variant
Dim vDirection As Variant
Dim vIntPoint As Variant
Dim dStartPoint(0 To 2) As Double
Dim dDirection(0 To 2) As Double

dStartPoint(0) = 2500: dStartPoint(1) = 2500: dStartPoint(2) = 305
dDirection(0) = 0.6: dDirection(1) = 0.4: dDirection(2) = -0.5

vStartPoint = dStartPoint
vDirection = dDirection

vIntPoint = oSurface.IntersectPointWithSurface(vStartPoint, vDirection)



The code then returns a point on the surface where the direction intersects the surface.

Monday, September 07, 2009

Sewer Lateral Program

The 50th post of this blog was a post on Sewer Lateral Code. Dana Probert, over at BIM on the Rocks, provided a link to the post a couple of weeks back. Since I guess someone out there is using the code I thought I’d update it.

In this version an alignment assigned to the lateral and the mainline pipes isn’t required. There is also an option to choose if the laterals adjust to the Invert, Center or Top of the mainline pipe. Another optional feature is being able to set the minimum, maximum and cover at the other end of the lateral. The minimum cover calculation uses the surface assigned to the pipe, if the pipe slope exceeds the maximum slope, it is adjusted to match the maximum slope. If a surface is not assigned then the slope of the pipe is changed to match the minimum slope.

Here’s a short video of the code in action: http://screencast.com/t/gOgdRiS2ZEnw

If you ever used the original code you will find this quicker and have more options. The code is in vb.NET and built for Civil 3D 2010 (it could be changed to work in an earlier version). Email me if you are interested in purchasing the program (trying to sell my way to AU since trading my way to AU didn’t work too well).

The original code is still free, to get it to work in a newer version of Civil 3D update the references.

Thursday, September 03, 2009

No Man’s Land

I’m in Autodesk’s API No Man’s Land, the land between Subscription Tech Support and not being able to pay ADN fees. For instance I was working on a post last night for a vb.net routine to change the manning's value of a pipe. Everything was going good until I tried to assign a value to the PartDataField. The routine appeared to work correctly, no errors where thrown. Unfortunately the value didn’t change. I looked in help to see if I was doing something wrong, it looked like I was. So I changed the code to match what I understood was help was trying to say to do.

It’s at this point I find myself in No Man’s Land. I could try multiple iterations of different ways of trying to do something. This is problematic since I could be trying to get something to work that’s broken. I could try sending a Support Request (SR) to Subscription Tech Support to see if it’s a known issue. This is problematic, since depending on who gets assigned the SR, I could get either a helpful answer telling me they searched the defect list and did or didn’t find a bug or I could get the dismiss out of hand email telling me to go to ADN (extremely frustrating email). I could go to ADN as the SR email indicated, but it takes $1,350/yr to ask them questions.

There is another option of searching the web, but I don’t know if you’ve noticed, but there isn’t a large source of Civil 3D API code available on the web. Joshua Modglin, posting at www.Civil3D.com, has provided some code examples. There are also some samples on Civil 3D related discussion groups. Other than that I think this blog is probably the largest source of Civil 3D API examples on the internet, and if I’m having a problem this blog probably isn’t much help.

I really wish Autodesk would provide official support to people like me who are in No Man’s Land.

I would like to thank the Subscription Support people who in the past did provide more than just the dismiss out of hand email, I really appreciate it. I’d also like to thank the ADN people who have answered my occasional email in the past, even though they don’t have too.

Now off to find an answer to my question through unofficial means.

LinkWithin

Blog Widget by LinkWithin

Ad