Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
AutoLISP (Vanilla / Visual) / solid face copy ucs problem
« Last post by dussla on April 27, 2024, 03:00:46 AM »
hello friend
Thankfully I am testing rjp's code

I found that if I copy the face from the solid, the z value of the ucs is flipped 180 degrees.
So I applied the following code     (command "ucs" "z" "180" "")
But still the z values ​​are not flipped 

do you know problem ?


(defun c:bbb (/ a b e p )
  ;; RJP ≫ 2019-01-30
  (setvar "osmode" 0) ; Set 'osmode' variable to 0
  (while (setq p (getpoint "\nPick a point in a face: ")) ; Repeat until user picks a point
    (setq a (entlast)) ; Store the last entity created, presumably a face
    (vl-cmdf "_.Solidedit" "_Face" "_Copy" p "" '(0 0 0) '(0 0 0) "" "") ; Copy the face
    (cond
      ((eq a (setq e (entlast))) (print "Boundary not created..")) ; If no boundary created
      ((/= "REGION" (cdr (assoc 0 (entget e)))) (entdel e) (print "Boundary created not valid..")) ; If created boundary is not valid
      ((setq b (vlax-invoke (vlax-ename->vla-object e) 'explode)) ; If boundary is valid, explode it
       (command "_.ucs" "_OB" (vlax-vla-object->ename (car b))) ; Set UCS to object
       (mapcar 'vla-delete b) ; Delete exploded objects
       (command "ucsicon" "or" "") ; Turn UCS icon to original position
      (command "ucs" "z" "180" "") ; Rotate UCS by 180 degrees
       (command "UCSICON" "ON"))) ; Turn on UCS icon
    ) ; End of while loop
  ) ; End of defun
72
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by xdcad on April 27, 2024, 02:12:41 AM »
Maybe add your path to %PATH% with SetEnvironmentVariable before you load XDrx.x64.dll
But you absolutely should not advise people to start moving DLLs into c:\windows\system32

What needs to be solved now is the non-EXE installation version.
Set support paths and trust paths. Just load it successfully once.

Is there a way to drag and drop a LISP to load, and then get the path in LISP? It would be easier if we got the path
73
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by It's Alive! on April 27, 2024, 12:05:22 AM »
Maybe add your path to %PATH% with SetEnvironmentVariable before you load XDrx.x64.dll
But you absolutely should not advise people to start moving DLLs into c:\windows\system32

74
.NET / Re: Autodesk Drive Abused in Phishing Attacks
« Last post by kdub_nz on April 26, 2024, 11:38:54 PM »

Ouch !! nasty
75
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by xdcad on April 26, 2024, 11:25:35 PM »
You should create a loader module that sets up the environment and loads dependencies
Like this.
https://github.com/CEXT-Dan/PyRx/blob/main/PyRxLoader/acrxEntryPoint.cpp
I use an .INI file as a fallback

The same directory as ARX has been specified to load the DLL, but some versions of ARX still do not load, prompting that it cannot be found.

Is there any other good way?

Code: [Select]
#ifdef _WIN64
LoadDLL(_T("XDrx.x64.dll"),true);
#else
LoadDLL(_T("XDrx.x86.dll"), true);
#endif

Code - C++: [Select]
  1. void LoadDLL(ACHAR* pszDllFilename, bool load)
  2. {
  3.         ACHAR szPath[210] = ACRX_T("");
  4.         ::GetModuleFileName(_hdllInstance, szPath, MAX_PATH);
  5.         ACHAR* pCursor;
  6.         for (pCursor = szPath; *pCursor != ACRX_T('\0'); pCursor++)
  7.         {
  8.                 if (*pCursor == ACRX_T('\\'))
  9.                         *pCursor = ACRX_T('/');
  10.         }
  11.         int idxSearch = lstrlen(szPath) - 1;
  12.         for (; idxSearch >= 0; idxSearch--)
  13.         {
  14.                 if (szPath[idxSearch] == ACRX_T('/') ||
  15.                         szPath[idxSearch] == ACRX_T(':'))
  16.                         break;
  17.         }
  18.         idxSearch++;
  19.         if (pszDllFilename)
  20.                 lstrcpy(szPath + idxSearch, pszDllFilename);
  21.         //adsout << _T("\nname=") << szPath;
  22.         ACHAR result[256];
  23.         if (acedFindFile(szPath, result) == RTNORM)
  24.         {
  25.                 if (load)
  26.                 {
  27.                         LoadLibrary(szPath);
  28.                         //acrxDynamicLinker->loadModule(szPath, 1);
  29.                 }
  30.                 else {
  31.                         FreeLibrary(::GetModuleHandle(pszDllFilename));
  32.                         //acrxDynamicLinker->unloadModule(pszDllFilename,false);
  33.                 }
  34.         }
  35.         return;
  36. }
  37.  

76
.NET / Re: Export IGES File
« Last post by WOWENS on April 26, 2024, 10:38:10 PM »
The only way I could figure out how to do this was with SendStringToExecute
I need to put this in a loop so I can do lots of files at once.
How would I go about doing this? and help would be great.
78
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by It's Alive! on April 26, 2024, 10:03:06 PM »
You should create a loader module that sets up the environment and loads dependencies
Like this.
https://github.com/CEXT-Dan/PyRx/blob/main/PyRxLoader/acrxEntryPoint.cpp
I use an .INI file as a fallback   
79
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by It's Alive! on April 26, 2024, 09:52:38 PM »
"try, Manually copy XDrx.x64.dll in the sys directory to c:\windows\system32"
Yuk!
80
XDRX-API / Re: [navigation] XDRX API sub-forum navigation post
« Last post by xdcad on April 26, 2024, 09:47:16 PM »
Getting error when trying follow the installation instructions
Quote
Command: (ARXLOAD "E:/Program Files/AutoCAD 2023/XDrx-API/SYS/XDRx.2023.x64.arx")
e:\program files\autocad 2023\xdrx-api\sys\xdrx.2023.x64.arx cannot find a dll or other file that it needs.
; error: ARXLOAD failed

This may happen with some versions,
try, Manually copy XDrx.x64.dll and XDrx.x86.dll in  sys directory,
to AutoCAD Install Directory
Pages: 1 ... 6 7 [8] 9 10