Jump to content

Recommended Posts

Posted

Hi everyone, 

 

Semi-long time listener, first time caller. I wanted to say thanks for the help and tips I got from this site over the past 6 months. As I have been working on two autolisps, one called P0 the other P9. The do the same thing, kinda. P0 will pull the dwgname field and save it to the clipboard, allowing me to use it wherever without have to flip to the folders . . pick the file . . . hit F2 . . CTRL+C . . . then go back. P9 does the same thing, but adds dwgprefix + dwgname. 

 

I work in a third-party firm that uses several client projects with their different CAD standards. Some forbid using fields in the titleblocks for various reasons and like them hard coded. P9 is useful for when I'm jumping between sub-folders and need to plot to source folders. I can't use the PDFExport feature, as different clients use different standards and I need to make sure everything is good before going for each plot, mostly for peace of mind. 

 

I wanted to share these with you guys as a thank you and giving back to the community. My autolisps learning is only about 4 - 5 months old. 

 

FYI, I didn't know till literally a few days ago, from this very site, that one can right click the tab for the copy full path. lol

P9.lsp P0.lsp

  • Like 2
Posted

Nice.

 

I use these for clipboard, always good to see other ways of doing things. You need both lines for each

 

;;Copy text to clipboard
;;(vlax-invoke (vlax-get (vlax-get (vlax-create-object "htmlfile") 'ParentWindow) 'ClipBoardData) 'setData "TEXT" --MYTEXTSTRING-- )
;;(vlax-release-object html) ;;and release the object


;;Get text from clipboard
;;(vlax-invoke (vlax-get (vlax-get (vlax-create-object "htmlfile") 'ParentWindow) 'ClipBoardData) 'getData "TEXT" )
;;(vlax-release-object html) ;;and release the object

 

  • Like 1
Posted

@SLW210

 

Quote

I see you indicate in your profile you use AutoCAD LT 2024, are these LT friendly?

Yes, these scripts are LT friendly. Cheers for making Cadtutor a great forum. 

 

@Steven P

 

Quote

I use these for clipboard, always good to see other ways of doing things. You need both lines for each

 

Thank you Steven for your input, I'm eager to give it a try. Over the past few weeks, I couldn't get the v-lax routines to work, I came to the conclusion it was an LT limitation. But your code looks different, I will try yours the next time I'm in the office, which is sometime next week. (Long weekend for me up here in Canada :) )

 

In my haste, I made a mistake. The scripts below, Q1 and Q2, just add the dwgname and full path with name to the clipboard respectively that's it. The P0 and P9 do the same but also call the plot dialog box automatically for the user. I won't re-add the P scripts, see above. 

 

To verify: 

Q1 - adds dwgname to the clipboard

Q2 - adds dwgprefix + dwgname to the clipboard

P0 - adds dwgname to the clipboard and calls the plot dialog

P9 - adds dwgprefix + dwgname to the clipboard and calls the plot dialog

 

Have a great weekend. 🍺

Q1.lsp Q2.lsp

  • Like 1
Posted

Yes, got to be careful with LT - some things work, some don't. Enjoy the long weekend

Posted

There are plenty of PLOT lisps out there, so your P9 should just keep going and plot what ever you have preset. We had multiple plot lisps. B-W Laser, Colour A3, A1 Plotter, PDf, TIFF. Think p1, p2, p3 and so on. The lisp will override the saved plot settings hence can go to a different printer.

 

One would do plot range which made pdf's of our layouts, as implied All of them or a range 2-8 and so on.

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