In plan view, how does one query a pipe (part) for the invert elevation by user specified point?
In plan view, how does one query a pipe (part) for the invert elevation by user specified point?there is no way that I am aware of....not even with a(n) expression as the information one needs
Use the Station and Offset _ Fixed Point command instead.
Also, I know that Civil 3D can query any given Station & Offset by point (using the Inquiry Tool), so why must I select the same point twice when adding an Alignment Label (i.e., _AeccAddAlignOffLbl Command) :? ?
In plan view, how does one query a pipe (part) for the invert elevation by user specified point?there is no way that I am aware of....not even with a(n) expression as the information one needs
like pipe station, or instantaneous grade, slope, elevation is not available to use in a formula.
Use the Station and Offset _ Fixed Point command instead.
Also, I know that Civil 3D can query any given Station & Offset by point (using the Inquiry Tool), so why must I select the same point twice when adding an Alignment Label (i.e., _AeccAddAlignOffLbl Command) :? ?
In plan view, how does one query a pipe (part) for the invert elevation by user specified point?there is no way that I am aware of....not even with a(n) expression as the information one needs
like pipe station, or instantaneous grade, slope, elevation is not available to use in a formula.
Thanks for the confirmation.
please keep me abreast of the result of this
otherwise just send me some breasts
This should be the center of pipe elevation. You'd then use 1/2 the InnerDiameterOrWidth property to determine the invert. This can all be done in lisp, btw. You just need to use the Curve class methods (not the vlax-curve-* lisp stuff, they fail). Here's a quick function to get a point at the specified parameter:
Currently, the point that is returned is not the invert (flow line), but appears to be the outside of pipe (top?) in the limited testing I've done (just got this working 2 mins ago). So I need to find the correct way of extracting the pipe invert next.
(defun getparam (pipe param)
(vlax-safearray->list
(vlax-variant-value
(vlax-get-property pipe 'pointatparam param)
)
)
)
(setq end0 (getparam pipe 0.0)
end1 (getparam pipe 1.0)
)
Would there be a reason to use InnerDiameterOrWidth in lieu of InnerHeight, given the intent to extract the pipe's invert elevation, if the Point3D (pt) specified is the center of pipe?When I first wrote a number of my pipe utilities the InnerHeight had a bug where it didn't always report the correct height (C3D2007 or 2008) so I just used the other and never checked if the bug was fixed. It appears that it has been.
How would I go about translating the plan view midpoint to the point along the pipe straight down about the Z axis (presuming Top, WCS), rather than the GetClosestPointTo() which is perpendicular to the 3D pipe? :?
Would there be a reason to use InnerDiameterOrWidth in lieu of InnerHeight, given the intent to extract the pipe's invert elevation, if the Point3D (pt) specified is the center of pipe?
How would I go about translating the plan view midpoint to the point along the pipe straight down about the Z axis (presuming Top, WCS), rather than the GetClosestPointTo() which is perpendicular to the 3D pipe? :?
When I first wrote a number of my pipe utilities the InnerHeight had a bug where it didn't always report the correct height (C3D2007 or 2008) so I just used the other and never checked if the bug was fixed. It appears that it has been.
As for the 2d/3d issue, I cheat. :-) I create a temporary pline using the pipe start/end xy and current drawing Elevation values, find the parameter at the point returned by GetClosestPointTo on the temp pline, then get the point on the pipe at that parameter. There's probably a more elegant way to do this, but it's what I came up with that works reliably.
First, be sure to use a LWPolyline, not a line. Lines report different parameters than plines/pipes. And just be sure to Dim the temppoly as nothing prior to the Try...block. I don't actually do it this way since my code operates on the entire network, whichever pipe/structure is closest to the cursor gets acted on. I create a collection of polylines for each pipe in the network at command startup that I dispose of as the command ends.
For the line though; do you just handle the deletion in the Catch/Finally block (if it exists)? :? If so, then I'd need to define the new 'line' outside of my Try scope, correct (otherwise the Catch/Finally block couldn't see it)?
Thanks!
... Do you think it would be faster (programmatically speaking) to query a simple Feature Line (start & end points) using the GetGradesAtPoint Method, rather than a LWPolyline and have to calculate the elevation? :? Adding the overhead of a Featureline may be counterproductive. All i can say is try it if you want :-)
Also, vlax-dump-object shows that the GetGradesAtPoint Method has three arguments, but I cannot seem to find this Method in Object Browser (with both AecBaseMgd, and AeccDbMgd referenced)... Where can I find more on this? This is a COM object, so look in Autodesk.Aecc.Interop.Land
(defun c:xx()
(while (null (setq vEnt (entsel ))))
(setq vEnt (vlax-ename->vla-object (car vEnt)))
(if (= (vla-get-ObjectName vEnt ) "AeccDbPipe")
(progn
(setq p1 (vlax-safearray->list (vlax-variant-value (vlax-get-property vEnt 'PointAtParam 0))))
(setq p2 (vlax-safearray->list (vlax-variant-value (vlax-get-property vEnt 'PointAtParam 1))))
(princ (strcat "\nElevation in Picked point: \n" (strcat "Start: " (vl-princ-to-string p1) "- End: " (vl-princ-to-string p2))))
(princ)
)
)
)
The values retrieved for a pipe are at the center of the pipe.To get the inverts you must use the InnerHeight of the pipe, divide by 2, subtract that from the desired point. Insert this into your code for that....Code - Auto/Visual Lisp: [Select]
Personally, I would work with lines/arcs to get the interpolated points.
yes, but would not drawing all those lines and or arcs, sort of defeat the purpose of using 3d pipes at all?Not at all, Michael. When trying to customize C3D with lisp, one must sometimes jump through hoops to get the desired results. This is just one of those cases where using simple, temporary, linework, based on the 3d pipes, allows one to get the desired data. It is not readily available from the Pipe object itself.
yes, but would not drawing all those lines and or arcs, sort of defeat the purpose of using 3d pipes at all?Not at all, Michael. When trying to customize C3D with lisp, one must sometimes jump through hoops to get the desired results. This is just one of those cases where using simple, temporary, linework, based on the 3d pipes, allows one to get the desired data. It is not readily available from the Pipe object itself.
And, fwiw, C3D development is still alive and kicking.
Oh, but you can get fancier with a .NET solution. This image is of a real-time invert tracker that updates as you move along the pipe.