<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Offset Feature Line Lisp Help in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7935532#M106433</link>
    <description>&lt;P&gt;Sure thing. I took many of the suggestions from here on the forums and added them to it. I'm not the greatest at AutoLisp, so the more difficult functions I couldn't add such as checking for two conditions, like asking what type of curb and whether it's a spill type or normal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 15:26:37 GMT</pubDate>
    <dc:creator>ArchD</dc:creator>
    <dc:date>2018-04-16T15:26:37Z</dc:date>
    <item>
      <title>Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7908806#M106425</link>
      <description>&lt;P&gt;This requires Civil 3D in its current state. I originally posted&amp;nbsp;this in Civil 3D Customization forums, but I never get the feedback I do as when I post here. Please forgive me for those of you who do not have access to Civil 3D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lisp routine that I created that basically offsets a feature line multiple times to create a curb in plan view. It first ask what type of curb then offsets the edge of pavement to the flow line, front of curb and back of curb by the distance and offsets for the curb chosen. It also puts the flow line, front of curb and back of curb on their own layers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least this is the goal. It is hit or miss on whether it works or not due to my limited coding abilities. I'm wondering if someone with the proper knowledge would be able to take a look at the code and maybe give me some feedback on how to make this work every time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached it so you can shame me on how poor my coding ability is.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 19:18:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7908806#M106425</guid>
      <dc:creator>ArchD</dc:creator>
      <dc:date>2018-04-04T19:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7909176#M106426</link>
      <description>&lt;P&gt;Please upload the dwg, at least a part to work on it. Save has plain acad.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whit&amp;nbsp; a before and after&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 21:46:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7909176#M106426</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2018-04-04T21:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7910760#M106427</link>
      <description>&lt;P&gt;I would prefer c3d dwg where it fails. And some description of the failures. Did you try vlide-trace where it fails? Or it is completely random?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Turn OFF the osnaps in your code!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 13:00:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7910760#M106427</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-04-05T13:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7910950#M106428</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/506682"&gt;@ArchD&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached it so you can shame me on how poor my coding ability is.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know about the failure [don't have C3D], but since you asked, I'll point out two significant improvements you can make.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the perfect situation for using a &lt;FONT color="#ff00ff"&gt;&lt;STRONG&gt;(cond)&lt;/STRONG&gt;&lt;/FONT&gt; function instead of a series of &lt;FONT color="#ff0000"&gt;(if)&lt;/FONT&gt; functions.&amp;nbsp; As you have it, the routine has to check the *ans* value against &lt;EM&gt;every&lt;/EM&gt;&amp;nbsp; possible option individually, no matter which one was chosen, and even &lt;EM&gt;after&lt;/EM&gt;&amp;nbsp; it has already found and processed the right one.&amp;nbsp; With &lt;FONT color="#ff00ff"&gt;(cond)&lt;/FONT&gt;, it checks only &lt;EM&gt;until&lt;/EM&gt;&amp;nbsp; it finds the satisfied &lt;FONT color="#ff00ff"&gt;cond&lt;/FONT&gt;ition, then does what's asked for about that, and &lt;EM&gt;doesn't bother looking at any of the others&lt;/EM&gt;, but jumps right to the end of the (cond).&amp;nbsp; It also &lt;EM&gt;eliminates&lt;/EM&gt;&amp;nbsp; all those (progn) functions that are needed within an (if) function to wrap multiple operations into a single 'then' expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, a single &lt;FONT color="#0000ff"&gt;(command)&lt;/FONT&gt; function can contain &lt;EM&gt;any number&lt;/EM&gt;&amp;nbsp; of command operations, so you don't need to wrap each one up and then start a new (command) function for the next one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An excerpt [untested]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;;;; Execute offsets based on user selection
  &lt;STRONG&gt;&lt;FONT color="#ff00ff"&gt;(cond&lt;/FONT&gt;&lt;/STRONG&gt;
    &lt;FONT color="#ff00ff"&gt;(&lt;/FONT&gt;(= *ans* "type-A")&lt;BR /&gt;    &lt;EM&gt;&lt;FONT color="#33cccc"&gt;; if this returns T, do the following and &lt;STRONG&gt;skip&lt;/STRONG&gt; all other conditions;&lt;BR /&gt;    ; if it returns nil, move to the next conditional test&lt;/FONT&gt;&lt;/EM&gt;
      &lt;FONT color="#0000ff"&gt;(command&lt;/FONT&gt;
        "OFFSETFEATURE" "0.583333" UserSel OSSide "0" ""
        "-layer" "M" "P-CURB-FL" "C" "151" "" "PS" "1 - Fine" "" ""
        "chprop" "L" "" "LA" "P-CURB-FL" ""
        "OFFSETFEATURE" "0.593333" UserSel OSSide "0.166667" ""
        "-layer" "M" "P-CURB-FOC-TYPE A" "C" "7" "" "PS" "1 - Fine" "" ""
        "chprop" "L" "" "LA" "P-CURB-FOC-TYPE A" ""
        "OFFSETFEATURE" "1.33333" UserSel OSSide "0.4166667" ""
        "-layer" "M" "P-CURB-BOC" "C" "3" "" "PS" "1 - Fine" "" ""
        "chprop" "L" "" "LA" "P-CURB-BOC" ""
      &lt;FONT color="#0000ff"&gt;); end command&lt;/FONT&gt;
      (setvar "CLAYER" CURLay)
    &lt;FONT color="#ff00ff"&gt;)&lt;/FONT&gt;; end type-A &lt;FONT color="#ff00ff"&gt;cond&lt;/FONT&gt;ition
    &lt;FONT color="#ff00ff"&gt;(&lt;/FONT&gt;(= *ans* "type-B")
      &lt;FONT color="#0000ff"&gt;(command&lt;/FONT&gt;
        "OFFSETFEATURE" "0.01" UserSel OSSide "0.1666667" ""
&lt;FONT color="#33cccc"&gt;....
....
&lt;/FONT&gt;        "chprop" "L" "" "LA" "P-CURB-BOC" ""
      &lt;FONT color="#0000ff"&gt;); end command&lt;/FONT&gt;
      (setvar "CLAYER" CURLay)
    &lt;FONT color="#ff00ff"&gt;)&lt;/FONT&gt;; end Shoulder &lt;FONT color="#ff00ff"&gt;cond&lt;/FONT&gt;ition
    &lt;FONT color="#ff00ff"&gt;(&lt;/FONT&gt;(= *ans* "Valley")
      &lt;FONT color="#0000ff"&gt;(command&lt;/FONT&gt;
        "OFFSETFEATURE" "1.16667" UserSel OSSide "-0.104167" ""
        "-layer" "M" "P-CURB-FL-VALLEY" "C" "151" "" "PS" "1 - Fine" "" ""
        "chprop" "L" "" "LA" "P-CURB-FL-VALLEY" ""
        "OFFSETFEATURE" "3" UserSel OSSide "0" ""
        "-layer" "M" "P-CURB-EOP" "C" "2" "" "PS" "2 - Very Thin" "" ""
        "chprop" "L" "" "LA" "P-CURB-EOP" ""
      &lt;FONT color="#0000ff"&gt;); end command&lt;/FONT&gt;
      (setvar "CLAYER" CURLay)
    &lt;FONT color="#ff00ff"&gt;)&lt;/FONT&gt;; end Valley &lt;FONT color="#ff00ff"&gt;cond&lt;/FONT&gt;ition
  &lt;FONT color="#ff00ff"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;; end cond
&lt;/FONT&gt;  (princ)
)
&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Apr 2018 13:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7910950#M106428</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-05T13:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911096#M106429</link>
      <description>&lt;P&gt;Okay, I think I fixed it. I had two versions floating around, one with bad information that broke it. Thanks for the help anyway, it's always appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:18:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911096#M106429</guid>
      <dc:creator>ArchD</dc:creator>
      <dc:date>2018-04-05T14:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911102#M106430</link>
      <description>&lt;P&gt;This is great information! I'll definitely use it all. Thanks so much.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:19:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911102#M106430</guid>
      <dc:creator>ArchD</dc:creator>
      <dc:date>2018-04-05T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911284#M106431</link>
      <description>&lt;P&gt;You should try to make your code more readable, copy-paste method is not always the best. Focus on&amp;nbsp;key things - don't mess the code with plenty of useless&amp;nbsp;parameters of layer... prop change... main code can look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  (cond ((wcmatch *ans* "type-A,-A")
         (:of2layer 0.583333 UserSel OSSide 0 "P-CURB-FL")
         (:of2layer 0.593333 UserSel OSSide 0.166667 "P-CURB-FOC-TYPE A")
         (:of2layer 1.33333 UserSel OSSide 0.4166667 "P-CURB-BOC")
         )
        ((wcmatch *ans* "type-B,-B")
         (:of2layer 0.583333 UserSel OSSide 0 "P-CURB-FL")
         (:of2layer 0.593333 UserSel OSSide 0.166667 "P-CURB-FOC-TYPE B")
         (:of2layer 1.33333 UserSel OSSide 0.4166667 "P-CURB-BOC")
         )&lt;/PRE&gt;&lt;P&gt;...all the rest can do some sub...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just suggestions... untested.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 15:08:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7911284#M106431</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2018-04-05T15:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7934083#M106432</link>
      <description>&lt;P&gt;Can you share the fixed version please?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 02:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7934083#M106432</guid>
      <dc:creator>greg_battin</dc:creator>
      <dc:date>2018-04-16T02:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Feature Line Lisp Help</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7935532#M106433</link>
      <description>&lt;P&gt;Sure thing. I took many of the suggestions from here on the forums and added them to it. I'm not the greatest at AutoLisp, so the more difficult functions I couldn't add such as checking for two conditions, like asking what type of curb and whether it's a spill type or normal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 15:26:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/offset-feature-line-lisp-help/m-p/7935532#M106433</guid>
      <dc:creator>ArchD</dc:creator>
      <dc:date>2018-04-16T15:26:37Z</dc:date>
    </item>
  </channel>
</rss>

