Jump to content

RlxPaste


rlx

Recommended Posts

First of all happy new year for everybody.

 

Now about this app , RlxPaste. I often have need to copy some objects from one dwg to another. Although I allready have written a 'perfect' app for that , all my colleagues use it and I didn't want to add my junk symbols to it. So I came up with this app , which allows you to simply create symbols on the fly for local use.

 

I think / hope the interface is self explanatory.

 

 

You can control the grid in the setup dialog and you can select the folder where you save your symbols. Btw , double click to insert and if you want to delete item , click delete button and then click on image to delete.

 

You can add a complete folder and its subfolders at once with the button Add Folder in the main dialog. This is usefull when you have for example a cd from a vendor or client with their company symbols.

 

Hope it is usefull.

 

 

gr. Rlx

RlxPasteMain.jpg

RlxPasteSetup.png

RlxPaste.dcl

RlxPaste.LSP

Edited by rlx
  • Like 1
Link to comment
Share on other sites

Cannot test it :(

Command: RLXPASTE
bad argument type: streamp nil

 

 

Difficult to say why , but have you selected a folder to save your objects in and do you have write permission in that folder?

 

 

Set your vlisp editor to break on error and use view error trace to see what the error source is.

 

 

btw - you might want to delete the (c:RlxPaste) at the end of the lisp file. This to start app upon loading.

 

 

gr.Rlx

Edited by rlx
Link to comment
Share on other sites

Hi Grrr,

 

looks like something is going wrong in read-datafile

 


(defun RlxPaste_ReadDataFile ( / fp inp)
 (setq RlxPaste-DataFileName (strcat (getvar "SAVEFILEPATH") "RlxPaste.dat"))
 (if (not (findfile RlxPaste-DataFileName))
   (progn (setq fp (open RlxPaste-DataFileName "w"))(close fp)(gc)))
 (if (setq fp (open RlxPaste-DataFileName "r"))
   (while (setq inp (read-line fp))
     (if (findfile inp)(setq RlxPaste-BlockList (cons inp RlxPaste-BlockList)))))
 (if fp (close fp))(if RlxPaste-BlockList (setq RlxPaste-BlockList (reverse RlxPaste-BlockList))))

 

I use savefilepath (in my case here at home this contains "C:\Users\Rob\appdata\local\temp\") and this usually is a folder where every cad user has read/write acces. Never had any problem with this. But you could try another folder for the data file , something like :

 

 (setq RlxPaste-DataFileName "c:/temp/RlxPaste.dat") 

 

Dont know if you know you to debug a program by setting breakpoints. Place your cursor at beginning to a line of code and press F9 and you should see a red marker , indicating the program will wait there so you can inspect variables. I don't see anything wrong with my code so I think it has to do with write acces. But if savefilepath proves to be not fool proof I will maybe have use another strategy.

 

Gr. Rlx

Link to comment
Share on other sites

It works so far. Was wondering if you could get previews better as 3D shaded.. little challange :)

 

 

now that would be a little challange indeed :-)

 

 

Could play with background color of dialog slide image , could try to first save 3d shade as image , attach it and make slide from that. Never ment this app for complicated / shaded objects , but you're right , it would be a challange smilie.png

 

 

 

 

 

gr.Rlx

RlxPaste2.jpg

RlxPaste1.jpg

Edited by rlx
Link to comment
Share on other sites

Hello Rlx, sorry for late replying:

 

I can comfirm that it works on acad 2015 !

But I still have another problem - I don't get that alert box like in the video for "Confirm Export of Autocad Map Data"

And the main issue after that is that all my lines/plines in the entire drawing turn bold like in your preview boxes.

Do you know what might be the problem?

Command: RLXPASTE
Insertion point for symbol :
Select objects: Specify opposite corner: 14 found
Select objects:
.undo Current settings: Auto = On, Control = All, Combine = No, Layer = Yes
Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: mark
Command:
Mark encountered
Regenerating model.

My guess is somewhere here:

ScreenShot014.jpg

Link to comment
Share on other sites

Hi Grrr,

 

 

Since I don't work with Autocad 2015 I can't really duplicate your problem. What I can do is to try to use another way to save the blocks and make the slide. The way I do it at the moment is a kinda dragon-approach : set undo mark , then select your objects , 'kill' the rest (erase) , zoom in on them & make a slide. Guess I could try to be more 'gentle'.

 

 

The reason it works (and was ment) for me is that I work with just plain 2d electrical diagrams , so small drawings , no need for usc , ocs , trans etc etc. Did make some changes to the app allready but I wil have another look at slide making process as soon I have time to do so.

 

 

The app is in fact more or less a fancy copy / copy with base point , no more , no less.

 

 

gr.Rlx

Link to comment
Share on other sites

Rlx,

I found a temporary soliution to my problem: I use "rlxpaste" to add objects, then exit the drawing without saving it, and after re-opening just use "rlxpaste" to paste objects.

 

I am aware that its just a "fancy copy" routine but its very powerful (before you created this thread, I was looking for something simillar - the only thing I found was copystored by Alan J.T.)

I bet that once the "offset" command looked like "just copy paralel line at distance" but now people can't imagine working without it. (A teacher of mine told me stories that lispers developed it)

 

The only thing I could suggest you, is working on the paste/insert functionality (for example insert on selection of lines's/plines's verticies/intersections/midpoints of segments).

Well ofcourse if you have the time and will :)

Link to comment
Share on other sites

Nothing against the program (I can see you have invested a lot of time & work into the application), but don't Tool Palettes already offer this functionality?

Link to comment
Share on other sites

Nothing against the program (I can see you have invested a lot of time & work into the application), but don't Tool Palettes already offer this functionality?

 

 

Now you're telling me! icon14.gif

 

 

It's always nice when you can put your own smell to something , i'm pretty sure you can relate to that Lee. And secondly , you posted your Xmas present programming lesson , this was mine , little DCL fun.

 

 

Yes it did cost me some time but it was time well spent as far as I'm concerned. Wife was looking Darts and I really don't give a *** about darts so I sat on the sofa with my notebook and had some fun making this. It really was about the slide part I wanted to make flexible.

 

 

Btw, did a few minor updates (before Grrr's remarks) Repeat insert (cancel with esc of R-mouse cancel) , if you want to name the symbol or not , ask for insertion point (or just paste / insert @ 0,0) , few status lines in main dialog. Nothing major , just little details.

 

 

Will try to look into the insert issues but as said before my intention was just a nice little copy and paste app so no prio @ this moment.

 

 

Gr. Rlx

Edited by rlx
Link to comment
Share on other sites

Great job! But how to page up and page down?

 

 

You don't ... You can increase the grid but that's it. This routine is just ment as an example and as a copy paste (hense the name). I have another app for my symbols which has a ton more options , but its vanilla and as it is right now not as stable as I would want it for me to publish something like that on the web

 

 

btw , welcome to Cad Tutor!

 

 

Gr.Rlx

rls.png

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