Thank-you very much Guilherme. I felt like my initial idea was good but the videos didn't turn out quite as well as I hoped, so I'm extra happy that people are benefiting from them. I'm getting more views/likes than I anticipated. I'll try to get some free time and append videos to this playlist making the example code work better.
@@randomCADstuff The execute was also great, maybe in the fourth video things got a bit too complicated for me, maybe rewatching I'll understand better, but I've learned a lot so far, so please keep coming with the videos!
And here I was thinking Vlisp is just a visual interface for editing autolisp.! (ironic because code I've already created uses the extra tools but I cut and pasted that bit many years ago). Thanks for the video.
For quite a while I was pretty in-the-dark regarding where the 'Visual' terminology came from. A very long time ago I actually took a course in AutoLISP at my local college (well through their online platform). The course was kind of lackluster. It was advertised as a 'Visual' LISP course but only taught regular LISP ironically. I think the editor must have been named something else prior to the Visual extensions being added to AutoLISP (I think sometime in the late 90's if my memory serves me right).
I have created block and that block I have use as a insert block. For insert block I prefer CUIX.File and VLSIP. Through CUIX I have set symbol in Autocad ribbon and the same block used through LISP for shortcut command. When I used through CUIX I got correct block layer properties. I mean I have created in "xyz" layer. Using through CUIX I got the same layer in my new drawing. If even my current layer is 0 but they still put "xyz" layer in my new drawing. This is correct for me. When I use LISP shortcut command for the same insert block. If my current layer is "ABCD" then block properties has changed automatically. The layer of blocks has changed into current layer.
(if (not(tblsearch "layer" "Reccs1")) ;; check if the drawing not existing the block name (progn (vl-cmdf "-insert" "Recc3" "0.0,0.0,0.0" "" "" "") ;;inserts your master file from some defined file path (vl-cmdf "._erase" "l" "") ;;erases the block; last inserted ))
(if (setq insertPoint (getpoint " pick point:")) (vl-cmdf "-insert" "Reccs1" pause "1" "1" "0") ;;inserts the block you want from the master file ) (princ) )
I'm still trying to figure out what exactly the problem is! I might have to re-watch my video to figure that out. It's been a while since I ran an AutoLISP function from a CUI/Ribbon button; I only really used the CUI in AutoCAD LT (because it doesn't let you use LISP).
Congratulations on the video, you made these VL functions very easy to understand!!
Thank-you very much Guilherme. I felt like my initial idea was good but the videos didn't turn out quite as well as I hoped, so I'm extra happy that people are benefiting from them. I'm getting more views/likes than I anticipated. I'll try to get some free time and append videos to this playlist making the example code work better.
@@randomCADstuff The execute was also great, maybe in the fourth video things got a bit too complicated for me, maybe rewatching I'll understand better, but I've learned a lot so far, so please keep coming with the videos!
And here I was thinking Vlisp is just a visual interface for editing autolisp.!
(ironic because code I've already created uses the extra tools but I cut and pasted that bit many years ago).
Thanks for the video.
For quite a while I was pretty in-the-dark regarding where the 'Visual' terminology came from. A very long time ago I actually took a course in AutoLISP at my local college (well through their online platform). The course was kind of lackluster. It was advertised as a 'Visual' LISP course but only taught regular LISP ironically.
I think the editor must have been named something else prior to the Visual extensions being added to AutoLISP (I think sometime in the late 90's if my memory serves me right).
@@randomCADstuff probably the "visual" came from Visual Basic (VB), since these lisp functions are essentially VB functions ported to autolisp
@@GdiaelBarros Thanks! And very cool to know.
Can you make a video for main function with sub function knit working
I have created block and that block I have use as a insert block. For insert block I prefer CUIX.File and VLSIP.
Through CUIX I have set symbol in Autocad ribbon and the same block used through LISP for shortcut command.
When I used through CUIX I got correct block layer properties. I mean I have created in "xyz" layer. Using through CUIX I got the same layer in my new drawing. If even my current layer is 0 but they still put "xyz" layer in my new drawing. This is correct for me.
When I use LISP shortcut command for the same insert block. If my current layer is "ABCD" then block properties has changed automatically. The layer of blocks has changed into current layer.
VLISP
(defun c:RECCS2 (/ blockName fileName insertPoint )
(setq blockName "Reccs1"
fileName "C:\Desktop\To be check\Recc3.dwg")
(if (not(tblsearch "layer" "Reccs1")) ;; check if the drawing not existing the block name
(progn
(vl-cmdf "-insert" "Recc3" "0.0,0.0,0.0" "" "" "") ;;inserts your master file from some defined file path
(vl-cmdf "._erase" "l" "") ;;erases the block; last inserted
))
(if (setq insertPoint (getpoint "
pick point:"))
(vl-cmdf "-insert" "Reccs1" pause "1" "1" "0") ;;inserts the block you want from the master file
)
(princ)
)
CUIX
^C^C-insert;Recc3;\;;;explode;last;-purge;Blocks;Recc3;N;
I'm still trying to figure out what exactly the problem is! I might have to re-watch my video to figure that out. It's been a while since I ran an AutoLISP function from a CUI/Ribbon button; I only really used the CUI in AutoCAD LT (because it doesn't let you use LISP).
I'm only here to find out how to run lisp code in VLIDE
one day, one day...