Recent Posts

Pages: 1 [2] 3 4 ... 10
11
AutoLISP (Vanilla / Visual) / Re: most common value in a list (mode)
« Last post by JohnK on Today at 03:41:23 PM »
Not quite sure I understand either but it sounds like you'd want to build a "Run Length Encoding" or something of that nature (something to count the instances of each entry) to find the highest number, next highest, lowest, etc.
https://www.theswamp.org/index.php?topic=57274.0#top
12
AutoLISP (Vanilla / Visual) / Re: most common value in a list (mode)
« Last post by ribarm on Today at 03:39:02 PM »
What is mode of a list?
13
AutoLISP (Vanilla / Visual) / most common value in a list (mode)
« Last post by hmspe on Today at 03:25:26 PM »
I'm looking for a lisp function to find the mode of a list.  The list is numeric and represents distances between inserts in a drawing.  I'm having no luck finding anything useful.  Any help would be appreciated.  Online search is no help at all.
14
.NET / Re: AutoCAD2025 and loading dependency dll's
« Last post by cmwade77 on Today at 03:15:09 PM »
Most, if not all Autodesk 2025 products have moved to .NET 8.0
15
.NET / Previews or Thumbnails
« Last post by cmwade77 on Today at 02:40:45 PM »
I am trying to extract a preview or thumbnail from drawings without opening them, I have code that does well if the thumbnail is saved (i.e. it shows up in Windows Explorer), but if it isn't saved, it doesn't show up.

Yet, it sheet set manager, a preview can be shown just fine for the same drawing, so there has to be something that I am missing here. Here is my code as it stands:
Code - C#: [Select]
  1.  public static Bitmap? Thumbnail(this string drawingFilePath)
  2.  {
  3.      try
  4.      {
  5.          using (Database db = new Database(false, true))
  6.          {
  7.              db.ReadDwgFile(drawingFilePath, FileOpenMode.OpenForReadAndAllShare, true, null);
  8.              Bitmap? thumbnail = db.ThumbnailBitmap;
  9.              if (thumbnail == null)
  10.              {
  11.                  return PlaceholderThumbnail();
  12.              }
  13.              return thumbnail;
  14.          }
  15.      }
  16.      catch (System.Exception ex)
  17.      {
  18.          Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage($"\nError extracting thumbnail: {ex.Message}");
  19.          return null;
  20.      }
  21.  }

Any ideas would be greatly appreciated.
16
.NET / What’s new in C# 13
« Last post by It's Alive! on Today at 04:07:48 AM »
17
AutoLISP (Vanilla / Visual) / Re: Lisp to count text in drawing
« Last post by HOSNEYALAA on Today at 12:37:13 AM »
Can you attached example drawing

try replace

;;(setq s (ssget "_X" '((0 . "TEXT,MTEXT"))))


(setq s (ssget "_X" '((0 . "TEXT,MTEXT")(1 . "*GL1A*"))))
18
.NET / Re: AutoCAD2025 and loading dependency dll's
« Last post by MickD on May 29, 2024, 10:59:47 PM »
I only have one .NET module left that I maintain in the app store. The framework version actually loaded just fine in 2025,
but I went ahead and used the conversion tool and ported it to Core.
:-o
Looks like I need to create another project just for this build...

I never tried to step into to it with the debugger though. I remember that .NET would load specific debugger depending on the .config settings.. so it may run, just not debug
I’m going to rewrite it in C++, I didn’t take the news of Microsoft depreciating framework well   :crazy2:

:)
19
.NET / Re: AutoCAD2025 and loading dependency dll's
« Last post by It's Alive! on May 29, 2024, 10:37:31 PM »
I only have one .NET module left that I maintain in the app store. The framework version actually loaded just fine in 2025,
but I went ahead and used the conversion tool and ported it to Core.

I never tried to step into to it with the debugger though. I remember that .NET would load specific debugger depending on the .config settings.. so it may run, just not debug
I’m going to rewrite it in C++, I didn’t take the news of Microsoft depreciating framework well   :crazy2:

20
.NET / Re: AutoCAD2025 and loading dependency dll's
« Last post by MickD on May 29, 2024, 10:13:21 PM »
Maybe that’s a Framework DLL that doesn’t like Core?

huh, thanks for the heads up, I checked the install req's and:
Quote
If it’s not already installed, Microsoft .NET Framework 4.8, will also be installed with AutoCAD 2025 including Specialized Toolsets. Microsoft .NET Framework 4.8 also requires a Windows version that’s currently supported by Microsoft.

Then did a search for AutoCAD dependencies and found: ( https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-450FD531-B6F6-4BAE-9A8C-8230AAC48CB4 )
Quote
If you are targeting AutoCAD 2025 or AutoCAD 2025-based programs, you should use:

Microsoft Visual Studio 2022 version 17.8.0
Microsoft .NET 8.0

Ok, but then:
Quote
Note: Applications compiled with Microsoft Visual Studio 2019 version 16.0 or later should load into AutoCAD 2025 or AutoCAD 2025-based programs without any problems.

Anyway, thanks again for the nudge, I'll try it with .Net 8 and see how that goes, cheers.
Pages: 1 [2] 3 4 ... 10