Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/10/2022 in all areas

  1. Hello Have to do a job that involves around 3000 loops + 2500 connection diagrams & IO-lists. Bottom line was, either I do it in half of the time and half of the money or else... (the job goes overseas) For example a loop diagram has a transmitter , connected to a Junction Box , then to a control panel + IO panel. Loops have to be made as-built (update revision, remove clouds etc). Ok already have an app for that. But I also have to check each loop against JB and CP channel (oh crap...) So I came up with the idea to first read all the titleblock titles in the project folder and save this to a (txt) file. Then, having the loop open in AutoCad , I wanted to be able to either type in part of the title in the search list box or select the JB or CP symbol and open the drawing. And that's when I decided to create my very own BFF (Bulk File Finder) App is still in its beta but so far it seems to be doing what I hoped it to do. (but some little points may yet come to surface , but hey , baby is only one weekend old so gimme a break) Make sure you put in (1) blockname of your (title)block , (2) name(s) of attributes with the titles in it, separated by comma's , (3) select your drawing source folder and (4) choose create (don't forget to save it afterwards) In the top left listbox (green) you can put in some search strings and you can also save this. When all this is done and you press ok , it should find all the drawing (titles) matching the search criterea. Some of the Select and Find buttons (purple section) are not working yet because those will involve some company special ops. Most of my time went into the interface and progress bar thats activated when scanning for folders, drawings & titles. Maybe it will be helpfull to others , maybe not because it might be too specific to my own situation but I present it on an as-it-is basis and because its been a while I posted something and posting on CadTutor seems to be getting rarer. If its not working or helpfull : trashcan , yes you can , because of my workload I don't have much time to do user request's RlxMyBFF.lsp
    2 points
  2. Call Grind for Lisp (CG) is a Lisp application aimed to help profiling of lisp programs running on IntelliCAD, AutoCAD, BricsCAD and alikes. If you are in need of determining the bottle-necks, the time consumed for specified functions , visualize call diagram of your lisp application you may find CG useful. CG collects data (time consumed by each function and call stack) at runtime (dynamic analysis) and creates “call grind” type output to be used by CacheGrind system (credit goes to authors). Requirement: Download and install qcachegrind software recompiled for Windows version of KCacheGrind. Refer to header of the lisp code attached for instructions. Limitation: May fail in consecutive functions forming loop. License: Copy Left Enhanced the code, found a bug? Just let me know. Suha cg.lsp
    1 point
  3. Typos!! (setq table (vl-sort table <)) in 'Layers' LISP should be (setq table (vl-sort table <)) should line (setvar 'clayer (nth (- 1 l) table)) be swapped in 'LP' LISP: (setvar 'clayer (nth (- l 1) table)) final one, as it is each iteration adds another set of layer names in layers list. Might be tempted to set 'table' as a blank list in the defun 'layers' (setq table (list)) However, very nice again.
    1 point
  4. Oh hey, yeah, that actually works quite well. I was definitely too deep into the vl-list->string rabbithole and wasn't thinking about just breaking down my list into strings using another method lol
    1 point
  5. That is a list of integers they need to be converted to strings to be written to a file. (foreach x lst (if (numberp x) (writeline (rtos x 2 0)) (writeline x) ) )
    1 point
  6. building off of @Steven P this should sort the layers into alphabetical order. ;;----------------------------------------------------------------------------;; ;; Step Down one layer A-DIM > A-DIM 100 (defun C:LD (/ p laylst) (if (and (setq p (vl-position (getvar 'clayer) (layers))) (> (length laylst) 1) (> (- (length laylst) 1) p)) (setvar 'clayer (nth (+ p 1) laylst)) (prompt "\nOn Last Layer/Or Only One Layer") ) (princ) ) ;;----------------------------------------------------------------------------;; ;; Step up one layer A-DIM 100 > A-DIM (defun C:LP (/ p laylst) (if (and (setq p (vl-position (getvar 'clayer) (layers))) (> (length laylst) 1) (/= p 0)) (setvar 'clayer (nth (- p 1) laylst)) (prompt "\nOn First Layer/Or Only One Layer") ) (princ) ) (defun layers () (setq laylst (list)) (vlax-for lyr (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (setq laylst (cons (vla-get-name lyr) laylst)) ) (setq laylst (vl-sort laylst <)) ;sort to be in alphabetical order )
    1 point
  7. I found getexcel had a couple of say needed items so wrote my own, but the getrange above was by Fixo and I have since got another ZIP file with heaps of his excel functions in it but again you need to understand how the Excel <-> Autocad works. Please note you can run Autocad from excel using a excel macro the reverse of the same functions but in Excel. Look at Alan3 draw object xl acad.xlsm
    1 point
  8. How much RAM do you have? Also, you may need DirectX 12. Check the Nvidia website to make sure you have the latest video drivers installed. And lastly, you will need .NET FrameWork version 4.8 or later. Autocad 2023 Minimum System Requirements
    1 point
  9. There is a borehole extension available for Autocad put out by Autodesk may be worth looking at. Can not remember exact name. Your home work is do some googling I would have to also to find it again. "Borehole Extension Autocad" Just a bit more you can make a csv file of your points and then read that file into a pline command fairly easy again Google, ok now for the real smart way, open the excel file with the points say 2 columns, run a lisp in Acad it will ask you to select range in excel, wow pline made. The excel stuff needs a bit of learning 1st but there is a wealth of examples out there.
    1 point
  10. It's definitely a long journey to learn this language. I would have already posted a solution if I wanted to, but seeing the amount of effort you've put into learning, I thought I'd step back and see how you do, whilst at the same time offer any insights and suggestions when you're stuck. I think others feel the same way. So far you're doing great and learning a bunch. Speaking of suggestions: instead of a polyline with a hatch, it appears that your task seems doable by just drawing the polyline top down, whilst setting the polyline thickness in the beginning (unless you need a different hatch pattern of course). So instead of: (command "_.rectang" MyPt (mapcar '+ (list MyW MyH 0) MyPt)) (command "-hatch" "S" (entlast) "" "") You could set the polyline thickness before the repeat loop using: (setvar "PLINEWID" MyW) and then draw the polyline like so: (command "_PLINE" MyPt (mapcar '+ MyPt (mapcar '+ MyPt (list 0 MyH 0))) "") So then it saves having to do an extra command. On a note, if you'd like, I can create a sample command to show another approach in which it could be done, all layers considered. I would only need the sample csv file with all the information. If you needed to input the text on the right manually, it defeats the efficiency purpose, so then what you've got is fine.
    1 point
  11. The problem is that your guide curves are not touching the circles. There are large gaps between the ends of the curves and the circles. In order for the program to perform the Loft operation, it needs a precise path to follow from one circle to the other. If there are gaps or overlaps, the operation will fail. I made some adjustments to the curves, to make sure they start and end precisely at the quadrant of each circle and now the Loft command is working, as you can see in the screen grab below. I also attached the dwg file so you can see what I did. guides-adjusted.dwg
    1 point
×
×
  • Create New...