AutoCAD Civil 3D :: Offset Lisp Routine To Offset Selected Line?
Jun 7, 2013
I need an offset lisp routine to offset a selected line a set distance on each side of the selected line and change the layer of the offset lines to the current layer, and then keep prompting me to select the next line for offsetting until I'm finished.
We have been playing with offset alignments, and the tool appears very useful, especially in regards to laying out subdivision streets with curb, sidewalks, row, etc. In order to shortcut the process, I am hoping to develop a routine that will gather offset data for each type of offset, and then apply the appropriate styles, label sets, naming convention, etc.
We started going down the path of using Lisp or a recorded macro, but it quickly became obvious (through trial and error and some quick "googling") that another approach may be more suitable. I have attached a screenshot of an example of what we would like to automate.
I am trying to create a station-offset label style that will drop the trailing zeros in the offset section - e.g. 15' instead of 15.00', but if the offset is not at a whole number, e.g. 15.01, etc. it will display the entire offset.
I created two expressions: IF(OFFSET-TRUNC(OFFSET)=0,.1/12,.00000001/12)
and this one: IF(OFFSET-TRUNC(OFFSET)!=0,.1/12,.00000001/12)
I then created two offset components, one called truncated, and one called full, and assigned the heights to match the expressions.
I have attached the file, the style is ACHD-Sta Off-Rt [copy]
I am a beginner at LISP and this is a bit out of my league... and I'm trying to create a lisp where I can draw a polyline between 2 points that also places text with the actual distance offset above the line.
I did find this post and I'm not quite catching on.. [URL] ......
I posted a version of the Offset command that lets you Undo individual Offsets and change the offset distance/Through option, without getting out of the command, at Cadalyst CAD Tips: URL....
It's an upgraded version of an earlier concept by Gopal Ramesh. It's been downloaded almost three times every day since it went up, so I guess people expect it will be useful.
But the website's description includes: "this routine does not provide access to the Layer or Erase options of the built-in Offset command." The reason for that is that I'm working back in 2004, so those options are not present for me to emulate. [The Undo option in the routine is one that was added in some later version, but is a very useful enhancement for people using older versions, like me.]
I do also have an Offset-to-any-Layer [not just the source's or the current Layer] routine posted there: URL....
And I have a simple little routine to Offset something and Erase the source object. So I think I have all the "pieces" to include those options that newer versions have, but that I don't. I would like to combine the functionalities into the Offset-with-running-options routine. That way, if people want to use it to redefine the Offset command as I have done, in order to get the while-running distance change option, those working in newer versions won't be losing the Erase and Layer options in the process, and those in older versions will be gaining yet more options.
I am using MAYA 2012 on Windows 7. When I import audio (.WAV) it works fine, but if I offset it to a later frame the waveform moves to the right frame but when scrubbing the audio stays at 0. Making if very difficult to lip-sync. I have tried re-caching, playing the scene all the way through and all other options I have seen online.
I need a pit configuration, and I use the offset command to offset a base polyline to first 10 m and then 3 and so on.. is there a way to do this in an automatically way, that you can choose the lenght of the offset for each "offset" (i.e. 1st 10 m, 2nd 3, 3rd 10 m, 4th 3 m, and so on. I am actually using civil 3D.
I need a creative way to do something I know can be done in SW and Pro-E but as far as I know can not be done in Inventor to date
I am using the origin center line and semitry to control a box and its associated geometry and want to control the position or offset of a second box relitive to the first using a center line associated to the second box with a dimension. Problem is that the dim will only control its off set position relitive to the initial side from which the dim was placed. I.E. if the dim is placed when the CL of the second box is to the right it can not be moved to the left (what would in essence be a -dim condition) understandably Inventor does not like that but SW and Pro-E can use there little wheel and roll it down to 0 and then back up to a + dim in the opposit or in this case Left direction.
I know that I could place a dim off the interior wall of my first box geometry and associate it to the CL of the second box but the math to that may or may not be appropreatly effective in other words in condition A it may need to be 1/3 of d1 and in condition B it may need to be 2/3's of d1 or some other dimension.
I would love to be able to do this via iLogic or perhaps something to do with the placement relitive to a construction geometry utilizing a circle but so far I have not found a viable solution.
I am having a problem with some dimensions in a drawing. I have a 2D representation of my 3D model (using FLATSHOT) in my model space. I added the dimensions in a custom UCS and everything looks fine in paper space when looking at the TOP view but in model space I notice that the text is offset on the z-axis by a very large amount, like 7 meters large (I'm working in mm). How to fix the offset and get the text on the same plane as the line work?
I want to know the correct way to find the offset origin of a layout in an AutoCAD drawing. Let say I have a drawing that has many items on it. And I create a layout showing just the items in the lower right corner of the drawing. I want to know the offset origin of this layout relative to the Model space.
I came across some LISP commands that are supposed to do just that:
I've been looking for a lisp program. I've tried to mix-and-match code to come up with a working lisp but nothing is working. I am using a polyline rectangle to start with, offsetting it out 0.75 outward, and triming everything outside of the offset and erasing the offset.
lisp routine that will add together the values of text entities? For instance, if I have a big parking lot and each section is labeled with the number of spaces, I could pick the texts and it would add all the numbers together to give me a total. Right now I export to excel to do this. I have quite a few situations where this would be handy, not just for parking spaces, so I really just want a lisp that will add all my selected numbers.
I am creating a stitched leather look, and am able to get the black dots under one of the white stitches, but cannot offset my dotted path put a hole under the opposite end of the white stitch. So that I have 2 holes for each stitch.
I am using OffsetTaget.isValid in my subassembly.But i realize that when i put this formula it checks the whole drawing for that target and if the target polyline exist even a piece of polyline in the drawing then C3D considers it for all sample lines.Is ıt possible to be able to check each single sample line if it is going to intersect that target polyline or not?
I'm trying to create two offset alignments (one on each side of my centerline alignment). For some reason I can only create an offset alignment on the left side of my CL alignment, but not the right side.
I have an offset assembly and I have forced the skew of the second alignment. (Is a simple basic lane + a linkslopebetweenpoints and a markedpoint placed at the left extreme of a basic road assembly)
As you can see, there are errors at the area in which we have the greater angle between cross sections. What are the limits of this C3D feature ? Above more that "x" degrees of cross sections directions difference C3D are going to fail ?
When I use link offset to surface and attach on left side, still extend to right. I am targeting a slope stake line polyline that exists on both sides of the roadway, works fine on right side. Documentation indicates that a negative offset value is needed to use to the left. How do I use negative value and target a polyline?
I have created a widening then created an 11-foot offset from the widening for some reason I cannot create a 22-foot offset or an d11-foot from the first offset. I can go as high as 22.5 but no more. There are no curves in the alignment only linear tapers. why I cant get to 22-feet?
Civil 3D 2012 & 2013 HP Z210 Workstation Intel Xeon CPU E31240 @ 3.30 Hz 12 GB Ram 64 Bit Win7 OS
I want to show the alignment staining #'s but I also have a corridor and sample lines running through the stationing that I want to see. I do not wish to drag every alignment label and then have the leader showing.