Jump to content

CopyText.lsp: Copy/Swap Text/MText/Multileader/Attribute Values


alanjt

Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    31

  • kevynm

    10

  • Lee Mac

    8

  • gilsoto13

    4

Top Posters In This Topic

Posted Images

Sorry Alan. I added (vl-load-com) to the top of the code, ran the command independently. still get the same error message.

Thx for the quick response

Kevin

 

So odd.

Replace the error handler with this:

;;; error handler
 (defun *error* (#Message)
   (vl-bt)
   (AT:Undo "V" "E")
   (and #Message
        (not (wcmatch (strcase #Message) "*BREAK*,*CANCEL*,*QUIT*"))
        (princ (strcat "\nError: " #Message))
   ) ;_ and
 ) ;_ defun

 

 

Once you execute the command, copy what it prints to the command line and paste here.

Link to comment
Share on other sites

Kevynm,

 

I notice that you are using 2010.

 

I found that I had to type (vl-load-com) directly at the command line before any VL functions were recognised. Subsequently, I put (vl-load-com) in my ACADDOC.lsp, but its worth a try.

Link to comment
Share on other sites

Kevynm,

 

I notice that you are using 2010.

 

I found that I had to type (vl-load-com) directly at the command line before any VL functions were recognised. Subsequently, I put (vl-load-com) in my ACADDOC.lsp, but its worth a try.

 

 

That's what I was originally trying to get him to do.

http://www.cadtutor.net/forum/showpost.php?p=304171&postcount=17

 

Again, please try typing it in before you execute the command.

Link to comment
Share on other sites

Hey Guys

sorry to be a bother but it still does'nt work

 

Command: (vl-load-com)

 

Command: ct

Backtrace:

[0.59] (VL-BT)

[1.55] (*ERROR* "no function definition: VLAX-GET-ACAD-OBJECT")

[2.50] (_call-err-hook # "no function definition:

VLAX-GET-ACAD-OBJECT")

[3.44] (sys-error "no function definition: VLAX-GET-ACAD-OBJECT")

:ERROR-BREAK.39 nil

[4.36] (#)

[5.33] (VLAX-GET-ACAD-OBJECT)

[6.29] (AT:UNDO "V" "B")

[7.23] (C:COPYTEXT)

[8.19] (C:CT)

[9.15] (#)

[10.12] (# "(C:CT)" T #)

:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)

:ARQ-SUBR-CALLBACK.3 (nil 0)

; error: An error has occurred inside the *error* functionno function

definition: VLAX-GET-ACAD-OBJECT

 

that's what i get after running the routine

Link to comment
Share on other sites

This is what i get

Command: (vlax-get-acad-object)

; error: no function definition: VLAX-GET-ACAD-OBJECT

 

hey Alan,

thx for all the help man, really appreciate it.

Kev

Link to comment
Share on other sites

This is what i get

Command: (vlax-get-acad-object)

; error: no function definition: VLAX-GET-ACAD-OBJECT

 

hey Alan,

thx for all the help man, really appreciate it.

Kev

Very strange.

Just to cover the bases, paste this to the command line.

 

(vl-load-com)
(vlax-get-acad-object)

Link to comment
Share on other sites

OK HERE GOES

 

Command: (vl-load-com)

; error: COM exception: Library not registered.

 

Command: (vlax-get-acad-object)

; error: no function definition: VLAX-GET-ACAD-OBJECT

Link to comment
Share on other sites

OK HERE GOES

 

Command: (vl-load-com)

; error: COM exception: Library not registered.

 

Command: (vlax-get-acad-object)

; error: no function definition: VLAX-GET-ACAD-OBJECT

Now we're getting somewhere.

Just to clarify, you are using Autocad 2010, correct?

 

You may need to do a repair on you install, these files should be readily available and load upon typing (vl-load-com).

 

Paste this to the commandline:

(findfile "vl.arx")

 

If you get a file, type (arxload (findfile "vl.arx")) and let's see what happens.

Link to comment
Share on other sites

but....

on running the routine and picking my 1st text object..

Command: ct

 

Select source text object for copying or [Type]: Backtrace:

[0.63] (VL-BT)

[1.59] (*ERROR* "no function definition: VLAX-ENAME->VLA-OBJECT")

[2.54] (_call-err-hook # "no function definition:

VLAX-ENAME->VLA-OBJECT")

[3.48] (sys-error "no function definition: VLAX-ENAME->VLA-OBJECT")

:ERROR-BREAK.43 nil

[4.40] (# )

[5.36] (VLAX-ENAME->VLA-OBJECT )

[6.31] (AT:ENTSEL T "\nSelect source text object for copying or [Type]: " ("LV"

(0 . "MTEXT,TEXT,MULTILEADER,ATTDEF,ATTRIB")) "Type")

[7.23] (C:COPYTEXT)

[8.19] (C:CT)

[9.15] (#)

[10.12] (# "(C:CT)" T #)

:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)

:ARQ-SUBR-CALLBACK.3 (nil 0)

 

Error: no function definition: VLAX-ENAME->VLA-OBJECT

 

and so my sad story continues...:-(

Link to comment
Share on other sites

but....

on running the routine and picking my 1st text object..

Command: ct

 

Select source text object for copying or [Type]: Backtrace:

[0.63] (VL-BT)

[1.59] (*ERROR* "no function definition: VLAX-ENAME->VLA-OBJECT")

[2.54] (_call-err-hook # "no function definition:

VLAX-ENAME->VLA-OBJECT")

[3.48] (sys-error "no function definition: VLAX-ENAME->VLA-OBJECT")

:ERROR-BREAK.43 nil

[4.40] (# )

[5.36] (VLAX-ENAME->VLA-OBJECT )

[6.31] (AT:ENTSEL T "\nSelect source text object for copying or [Type]: " ("LV"

(0 . "MTEXT,TEXT,MULTILEADER,ATTDEF,ATTRIB")) "Type")

[7.23] (C:COPYTEXT)

[8.19] (C:CT)

[9.15] (#)

[10.12] (# "(C:CT)" T #)

:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)

:ARQ-SUBR-CALLBACK.3 (nil 0)

 

Error: no function definition: VLAX-ENAME->VLA-OBJECT

 

and so my sad story continues...:-(

 

I'm at a complete loss. These are commands from the Visual Lisp arx that's been included with Autocad since v2000. I feel you need to repair your install. You could try and get the vl.arx file from someone else (running the same version of Autocad as you) and replace yours with it.

Link to comment
Share on other sites

OK Alan,

you have been a great help. I will do a reload on the weekend.

Thanks again for all you help.

Kev

Keep me posted. It's so strange that you are having this issue.

Link to comment
Share on other sites

Alan,

you're right My Autocad which I d/l and installed from the AutpCAD site is corrupt.

when i run the express tool 'Breakline symbol' this is what i get

Command: breakline

no function definition: VLAX-PRODUCT-KEY

thx again

kev

Link to comment
Share on other sites

Alan,

you're right My Autocad which I d/l and installed from the AutpCAD site is corrupt.

when i run the express tool 'Breakline symbol' this is what i get

Command: breakline

no function definition: VLAX-PRODUCT-KEY

thx again

kev

 

Start>Settings>Control Panel>Add/Remove Programs>Autocad>Repair Installation

Link to comment
Share on other sites

awesome lisp sir. I was making something similiar but it only worked for attribute text. This one is even better than mine.

Thanks and enjoy. :)

Link to comment
Share on other sites

  • 2 weeks later...

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...