Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2025 in all areas

  1. like lido said In AutoLISP, cannot directly check for Windows Admin privileges, because AutoLISP is sandboxed within AutoCAD and cant see those types of windows things. tho I wouldn't try and copy files into sys folder. because if you do (admin rights) you would have a bunch of junk files in there. then the next step is to delete the copied file. that is a hop skip and a jump away from delete something needed. I suggest using cmd prompt. it can list admin users and you can output that to a txt file that autocad can then read. if user name true. something like "net localusers administrators > c:\admintest.txt"
    1 point
  2. Thanks for the clarification, my friend.
    1 point
  3. LT does support ActiveX/COM, but cannot interface with objects outside of the AutoCAD Object Model.
    1 point
  4. IMHO, if you're not using Visual Studio Community (free) or familiar with .NET API, you really should stop asking for .NET code, as you won't be able to do anything with it even if someone gives it to you. We do not keep the original plines, but can always get them back... here's an old LISP that I've since ported to .NET as a ContextMenu (right click menu) to quickly extract polylines for one or more Alignments. Since C3D Alignment object's EndingStation and StartingStation properties are read-only for LISP API, OP should use something like this, combined with (command "._lengthen" "_t") to set the total length, or (command "._lengthen" "_de") to increase/decrease overall length, then manually modify the Alignment via grips or remove/add geometry. (vl-load-com) (defun c:GetAlgnPlines (/ *error* acDoc clayer ss) (defun *error* (msg) (if ss (vla-delete ss)) (if acDoc (vla-endundomark acDoc)) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "\n** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (ssget "_:L" '((0 . "AECC_ALIGNMENT"))) (progn (vla-startundomark (setq acDoc (vla-get-activedocument (vlax-get-acad-object))) ) (setq clayer (getvar 'clayer)) (vlax-for x (setq ss (vla-get-activeselectionset acDoc)) (vla-put-layer (vlax-invoke x 'getlwpolyline) clayer) ) ) ) (*error* nil) ) Viewing the source code first may help reduce reluctance in the future: https://www.jetbrains.com/decompiler/# FWIW, CopIlot uses ChatGPT, so it really depends on your subscription as to which tier/models you have access to. As example, with M365 subscription you have access to ChatGPT-4 model (specifically the GPT-4-turbo variant), which is better than the free ChatGPT models (last I checked), but having a ChatGPT subscription provides you access to better models. HTH
    1 point
  5. @PGia I went out for my 40-50 km bike ride today and I've been thinking about this for a while. I tried OVERKILL-MR and I admit I wasn't able to figure out the right ranges to remove the excess without causing any damage to the rest of the drawing (perhaps someone can prove otherwise). For this reason, in my opinion, I think you should look for another solution. I assume your ultimate goal is to have a clean drawing on which to create a polygon topology. To do this, use '_mapclean' in C3D, activating the options in 'Cleanup Actions': - Delete duplicates - Erase short objects - Break crossing objects - Dissolve pseudonodes Repeat this 2 or 3 times. I don't think this will solve all the problems. But it will leave the drawing ready for you to try creating a polygon topology. The problematic polylines that remain in the drawing will appear with each attempt to create the topology. It's a laborious but safe process. I imagine you're confused because you suddenly have to do something you haven't done before. But I think you'll have no choice but to waste a little time learning.
    1 point
×
×
  • Create New...