Jump to content

Notepad++ run time exension


BIGAL

Recommended Posts

Hi I have been using the Notepad++ run lisp extension for ages and its stopped working after installing an upgrade, I tried going to the web site link

https://sourceforge.net/projects/nppactivexplugin/

and have just gone around in circles trying to join so could send a message re problem, is anyone else having problems ? Do you have a sourceforge account and could send a message would be appreciated.

 

; This routine runs the code in the active editor of NotePad++ from AutoCAD:
(defun C:n++ nil (C:RunFromNotePadPP)) ; Quick Run
(defun C:RunFromNotePadPP ( / scr *error* err np++ npeditor npSS npMS r )
  ; NOTE: Requires ActiveX plugin(by David Gausmann) installed on the NP++ 
  ; https://sourceforge.net/projects/nppactivexplugin/
 
  (defun *error* (m)
    (foreach x (reverse (list np++ npeditor npSS npMS))
      (vl-catch-all-apply (function vlax-release-object) (list x))
    )
    (gc) (gc)
    (and msg (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\nError: " msg)))) (princ)
  ); defun *error*
 
  (setq err
    (vl-catch-all-apply
      (function 
        (lambda nil ; THIS WORKS - IT GETS THE ACTIVE DOCUMENT CODE IN NOTEPAD !!!
          (setq np++ (vlax-get-or-create-object "NotepadPlusPlus.Application"))
          (setq npeditor (vlax-get np++ 'ActiveEditor))
          (vlax-invoke-method npeditor 'selectAll)
          (setq npSS (vlax-get npeditor 'selections))
          (setq npMS (vlax-get npSS 'mainSelection))
          (setq r (vlax-get-property npMS 'text))
          (vlax-invoke npSS 'setRange 0 0 0 0)
        ); lambda 
      ); function
    ); vl-catch-all-apply
  ); setq err 
 
  (*error* nil)(princ)
  (if (and r (not (vl-catch-all-error-p err)))
    (eval (read (strcat "(list\n" r "\n)")))
  )
); defun

 

 

Link to comment
Share on other sites

i have been using every day for years just turned off after last Notepad++ update, I have lodged a ticket at Sourceforge. Was wondering if anybody else has had the problem.

 

Uninstalled and reinstalled plugin no go Bricscad and Autocad.

Link to comment
Share on other sites

BIGAL,

 

I just tried this using the following (portable) version:

npp.8.2.1.portable.x64

 

It works fine.

 

Out of interest, what do you use it for? Is it to execute scripting language on NP++ files or other files (*.dwg), or both? This post has plunged me into the NP++ plugin world! 😀 

 

Thanks BIGAL

 

Link to comment
Share on other sites

I use it to code and run Lisp from N++ you can make your test code as big or break it into little code segments as needed. The closing bracket check is a great help.

 

I did get a response from David @ Sourceforge, awaiting some further comment. 

Edited by BIGAL
Link to comment
Share on other sites

I have used NP++ for a while now but never really looked at the plugins. I have installed a few now, including the brackets check plugin. The N++ function you shared above is really useful - I can see why you are keen to get this plugin working again 👍

Link to comment
Share on other sites

Load "Compare" plugin its really handy use with entget when changing 1 variable and trying to find dxf numbers. Same with setvar.

 

use replace ") (" with ")\r(" when comparing entgets.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...