<?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: C3D 2022, No Function Definition with LispFunction in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784971#M14472</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are exactly correct. I did not know that. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
    <pubDate>Sat, 27 Nov 2021 08:48:36 GMT</pubDate>
    <dc:creator>CodeDing</dc:creator>
    <dc:date>2021-11-27T08:48:36Z</dc:date>
    <item>
      <title>C3D 2022, No Function Definition with LispFunction</title>
      <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784140#M14468</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping this can be an easy fix for some of you experts. I'm by no means totally proficient with C#/.NET/Visual Studio yet. Trying to get better. Anyways...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In short.. Trying to create a Lisp Function via .NET (C#). I've created some Lisp Functions via this API &lt;U&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-extended-alx-functions/td-p/10013985" target="_blank" rel="noopener"&gt;in the past&lt;/A&gt;&lt;/U&gt;, but now that I've switched over to Civil 3D I can't seem to get something right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SIMPLE method / function:&lt;/P&gt;&lt;PRE&gt;using System;
using System.Windows;

using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;

namespace Test
{
    public class Testing
    {

        [LispFunction("test")]
        public static void RunTest(ResultBuffer rbArgs)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("Hello World!");
        }
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no build errors:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 627px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994242i30DF2FF05B493977/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe I have all the correct dependencies referenced:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 356px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994243i3FC00E453F2CF905/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yet, when I run the function, it does not exist:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 381px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994244iC6EB550E8A1909EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can I get some advice to get over this hurdle?&lt;/P&gt;&lt;P&gt;...About:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 319px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994246iA6C0CF558AA92148/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 17:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784140#M14468</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2021-11-26T17:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2022, No Function Definition with LispFunction</title>
      <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784175#M14469</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is Copy Local property equal to False for each AutoCAD reference ?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 17:55:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784175#M14469</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2021-11-26T17:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2022, No Function Definition with LispFunction</title>
      <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784183#M14470</link>
      <description>&lt;P&gt;Correct, they are all set to "No".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 364px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994257i39441275895D214D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 18:02:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784183#M14470</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2021-11-26T18:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2022, No Function Definition with LispFunction</title>
      <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784508#M14471</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5680873"&gt;@CodeDing&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you started a wrong project type with your Visual Studio (2022, it looks to me). I tell this from 2 pictures you attached in your post.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. The picture in your first post showing the references, it shows as "Dependencies", rather than "References" a it is supposed to be;&lt;/P&gt;
&lt;P&gt;2. The picture attached to your reply to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;shows "Copy Local" to "No", rather "False" as it is supposed to be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These 2 things indicate that you have chosen the project as .NET Core (.NET5/6), rather than .NET framework (4.7x/8). AutoCAD .NET API CAN ONLY work with .NET Framework, not .NET Core/5/6. You need to recreate your class library project as .NET Framework class library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 22:57:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784508#M14471</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2021-11-26T22:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2022, No Function Definition with LispFunction</title>
      <link>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784971#M14472</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are exactly correct. I did not know that. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 08:48:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/c3d-2022-no-function-definition-with-lispfunction/m-p/10784971#M14472</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2021-11-27T08:48:36Z</dc:date>
    </item>
  </channel>
</rss>

