Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. I understand what your asking for in case1 case2. I am asking is why your using them. might be a better optimization in how your selecting things. just asking for a higher level of what your trying to do.
  3. Thank you for your time. The inside stringer is set to code, because we do not "roll" our stringer plates the outside plates are different than the inside plates, this forces the plates to form a spiral. Really more of a polygon shape with a lot of edges, the selected objects below are for the outside stringer, while they start off in the same position, they move further apart each step, the amount is determined by the diameters. While the math for solving how much the difference is per step isn't very complicated, but it can be very time consuming. All of my searching leads me to believe that a path array will never be the answer, at least for the outside.
  4. Today
  5. SLW210

    Hybrid parallel

    Speaking of @marko_ribar here is some of his work at the SWAMP. To AutoCAD yours are complicated, if you would pay attention to what's been posted they all get off center in pretty much the same areas, sharp curves that get very wide and very narrow. The inside is shorter than the outside and the reference points differ in number. I posted links to Civil/GIS forums where lots of different software struggle with this. You'll probably have to be satisfied with Gian's solution. If I have time I "might" work on a [send points to Excel/CSV and bring them back in solution], though IMO, I like the QGIS solution or Python might be a way to go for more accuracy. What type of work are you doing? What you have posted looks to be Civil and/or GIS work. Why don't you have the proper programs for this type of work?
  6. @mhupp Case 1: I want to reduce the time. I use the "not (ssmemb n ss)" function, but it takes a long time when the selection set is large. case 2: Press the Enter key once to continue the loop, and press it twice to exit. ( empty selection set handle) The above two cases do not relate to each other. Please
  7. I'm not quite sure what your asking to optimize.
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 1 (setq ss (ssadd)) (if (not (ssmemb n ss)) (ssadd n ss) ;code );if ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 2 (setq flag T) (while flag (setq obj (ssget "_:S")) (cond (obj ;CODE ) ;ar (t (princ "\nNo selection made.") (initget "X") (setq bm (strcase (getstring "\nEnter 'X' to exit or press Enter to continue [X]: " ) ) ) (if (= bm "X" ) (setq flag nil) ; Exit the loop if user types 'x' (princ "\nInvalid input. Please try again.") ) ;if ) ) );WHILE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CASE 1: If the dataset is large, it will slow down the process. alternatives or tricks. CASE 2: Press the Enter key once to continue the loop, and press it twice to exit. or Only the letter "x" and empty inputs are acceptable.
  9. Agree with @mhupp, just set the layer in question to not plot. But don't use the Defpoints layer for this (that is reserved for dimension definition points) - use/create your own non-plotting layer.
  10. PGia

    Hybrid parallel

    I assume there are complex cases where determining a centerline that’s perfectly equidistant from both edges can be quite challenging. However, I don’t think the examples we’ve discussed in this thread fall into that category. I guess I can live without a perfectly accurate solution. My question was more of a spontaneous one — I thought it might be feasible to achieve in less demanding cases. In any case, the subject is really interesting and seems to be turning into a bit of a trending topic.
  11. If you use a plot lisp can set layers off/frozen do plot then turn back on. If using layouts can set layer frozen in a viewport but see in Model, may be the simplest way.
  12. Re draw stairs why the need for a dynamic block ? You can do from first principles by 2 methods work out the rise run etc to meet code. Using a block can place along a line using copy or multiple insert, another way is use array the block single row with multiple columns. When using Array use UCS Object pick the line for the array, then UCS W. NOTE the important part about Rise/Run meeting code.
  13. Yesterday
  14. mhupp

    Toggle dimension LISP

    https://www.cadtutor.net/forum/topic/97280-toggle-dimension-lisp/#findComment-666262
  15. Does anyone have a LISP routine that will toggle dimension text with a leader to different quadrants around the dimension line?
  16. Can also put these into a routine: (command "-layer" "ON" "ListofLayers, EachLayerSeperated, Withcomma" "") ; Turns layer ON.. try 'OFF' (command "-layer" "FREEZE" "ListofLayers, EachLayerSeperated, Withcomma" "") ; Freezes layer, ty 'Thaw' as well For completion: (command "-layer" "SET" "LayerName" "") ; Sets current layer MHUPPs probably runs faster (like milliseconds) and a nice option to choose the layer, my ideas maybe better if the layer names are set and can be hard coded into the routine... but useless if each drawing / project uses a different name
  17. They are either on a locked layer. have an error msg saying # number entitys on locked layer can't move. or inside a block or xref. (setq ss (ssget "WP" Co-ord)) ; Select all entities in window polygon (setq lock (ssget "WP:L" Co-ord)) ; Select entities not on locked layers (setq n (- (sslength ss) (sslength lock))) ; Calculate difference (if (> n 0) ; if n is greater than 0 display msg (prompt (strcat "\n" (itoa n) " entities on a locked layer")) )
  18. Depends on what you want to do. this will freeze a layer of the entity you select is on. (defun c:FreezeEntity (/ ent layN layO) (while (setq ent (entsel "\nSelect an entity to freeze layer: ")) (setq layN (cdr (assoc 8 (entget (car ent))))) (setq layO (vla-item (vla-get-Layers (vla-get-ActiveDocument (vlax-get-Acad-Object))) layN)) (vla-put-Freeze layO :vlax-true) (prompt (strcat "\nLayer \"" layN "\" has been frozen.")) ) (princ) ) -Edit Why not just have the calculations on defpoints or some other layer that is set not to print. (vla-put-Plottable layo :vlax-false)
  19. A hatch covers a specified area with a pattern, solid color, or gradient fill to identify a material such as concrete, steel, or grass. And it’s a cinch to add a hatch to your drawing. Today’s installment of the AutoCAD Foundation series gives you an easy step-by-step guide on how to add hatch to a closed area. Make a Hatch in AutoCAD When you start the HATCH command, the ribbon temporarily displays the Hatch Creation tab. On this tab, you can choose from more than 70 industry-standard imperial and ISO hatch patterns, along with many specialized options. The simplest procedure is to choose a hatch pattern and scale from the ribbon and click within any area that is completely enclosed by objects. You need to specify the scale factor for the hatch to control the pattern’s size and spacing. How to Use Hatches in AutoCAD Here are some examples of how you can use hatches: For overlapping hatches, fills, wide polylines, and text objects, use the DRAWORDER command to determine which objects are on top or below. For example, you probably want the yellow highway to cross over the blue river rather than the other way around. Keep Going To learn more about hatches, check out the full Place Annotation and Hatch Closed Areas AutoCAD Foundations article that also includes how to add text annotations. The post How to Add Hatch Pattern in AutoCAD: AutoCAD Foundations appeared first on AutoCAD Blog. View the full article
  20. A hatch covers a specified area with a pattern, solid color, or gradient fill to identify a material such as concrete, steel, or grass. And it’s a cinch to add a hatch to your drawing. Today’s installment of the AutoCAD Foundation series gives you an easy step-by-step guide on how to add hatch to a closed area. Make a Hatch in AutoCAD When you start the HATCH command, the ribbon temporarily displays the Hatch Creation tab. On this tab, you can choose from more than 70 industry-standard imperial and ISO hatch patterns, along with many specialized options. The simplest procedure is to choose a hatch pattern and scale from the ribbon and click within any area that is completely enclosed by objects. You need to specify the scale factor for the hatch to control the pattern’s size and spacing. How to Use Hatches in AutoCAD Here are some examples of how you can use hatches: For overlapping hatches, fills, wide polylines, and text objects, use the DRAWORDER command to determine which objects are on top or below. For example, you probably want the yellow highway to cross over the blue river rather than the other way around. Keep Going To learn more about hatches, check out the full Place Annotation and Hatch Closed Areas AutoCAD Foundations article that also includes how to add text annotations. The post How to Add Hatch Pattern in AutoCAD: AutoCAD Foundations appeared first on AutoCAD Blog. View the full article
  21. Hello, I seem to have come across an issue with array path, I am using a straight line as my path and when I stretch it in any direction the objects rotate. I intend to include this in a dynamic block, but I have to prove the concept first. This is for a spiral stairway; I have found a way to make AutoCAD do the required calculations but cannot find a way for the path array to be altered without having an issue. I have done this in Autodesk inventor, however we have very few licenses for it, most of which are being used by engineers. Attached is a "Basic" example of the path array. Path Array Sample.dwg
  22. SLW210

    Hybrid parallel

    I'll try to see how QGIS works if I get any CAD time at home, I started yesterday on it, but I had the latest with QT6 experimental downloaded and the plug-in for centerlines need the non-QT6 version, so spent the time removing and installing the correct version. So, if anybody was interested, be sure to download a version that the plug-in will work with. I also found more information on how the GIS folk tackle this issue and some new Plug-Ins to try for QGIS. Finding centrelines from polygons in QGIS - Geographic Information Systems Stack Exchange line - Creating centerline of river in QGIS? - Geographic Information Systems Stack Exchange HCMGIS — QGIS Python Plugins Repository Geo Simplification (processing) — QGIS Python Plugins Repository Voronoi diagram - Wikipedia Even better, just get the proper tool for the job. Probably less hoops to jump through for ArcGIS Pro, you can utilize the Polygon To Centerline tool. I'll try to remember to check with my daughter what she uses at work.
  23. Hi, can anyone help with this? I need a polyline to be created automatically. I draw a line, then I select an existing polyline, and wherever I drop the point, a new polyline should be created. Sample CAD file is attached. Each line distance should be 0.1 ft. Please help with this. Routes.dwg
  24. I tried @aridzv first lisp and it's working fine on my end. Yellow ones are moved to layer "Site", the Red ones are moved to "exist" layer as what he mentioned. Though these are all just rectang and PL. haven't tried it with blocks.
  25. @Hsanon last try... I used @BIGAL approch for layer criation code to force "exist" layer creation. Beyond that, there's nothing I can think of... see attached code: (defun c:chglyobjpl (/ acdoc p_list p_coord sset ent obj newLayerName newLayerName1 i) (vl-load-com) (setq acdoc (vla-get-ActiveDocument (vlax-get-acad-object))) (if (not (tblsearch "layer" "site")) (command "-layer" "Make" "site" "c" 3 "" "") ) (if (not (tblsearch "layer" "exist")) (command "-layer" "Make" "exist" "c" 50 "" "") ) (princ "\nSelect All Objects To Proccess") (setq ssall (ssget)) (setq p_list (entget (car (entsel "\nSelect the Polyline Boundery For ''exist'' Layer: ")))) (setq i 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To site Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if ssall (progn (sssetfirst nil nil) (setq newLayerName1 "site");;(getstring T "\nEnter new layer name: ")) (repeat (setq i (sslength ssall)) (setq i (1- i)) (setq ent (ssname ssall i)) (setq obj (vlax-ename->vla-object ent)) (vla-put-Layer obj newLayerName1) );;repeat (vla-Regen acdoc acAllViewports) (sssetfirst nil nil) );;progn (princ "\nNo objects found in the drawing.") );;if ;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To site Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq ent nil) (setq obj nil) (setq i 0) ;;;;;;;;;;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/selection-set-using-existing-polygon/td-p/11307274 ;;;;;;;;;;;calderg1000 msg-7 (if (setq p_coord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) p_list) );;end setq p_coord );;end if condition (sssetfirst nil (setq sset (ssget "_wp" p_coord))) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Select Objects In polygon;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if sset (progn (sssetfirst nil nil) (setq newLayerName "exist");;(getstring T "\nEnter new layer name: ")) (repeat (setq i (sslength sset)) (setq i (1- i)) (setq ent (ssname sset i)) (setq obj (vlax-ename->vla-object ent)) (vla-put-Layer obj newLayerName) );;repeat (vla-Regen acdoc acAllViewports) (sssetfirst nil nil) );;progn (princ "\nNo objects found in the drawing.") );;if ;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change Objects To exist Layer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (sssetfirst nil nil) (princ) );;end defun
  26. Dear Aridzv, The layer was made..... the initial program was working fine, all objects were being moved to layer "site" The second part was having an issue .... I feel it was not selecting the objects within the window / crossing polygon to convert the layer. I did put a video (as an attachment ) ..... Shall do so again.... hope you can view it. changing layers.mp4
  27. Hi all, I’m looking for a custom AutoLISP script (for batch freezing/thawing layers before printing). some particular layer i need for drawing internal circulation. bet they are not required during submission. is there any other method ther?
  28. Last week
  29. Thanks Steven added the C :, I normally load lisps like this so last line could be (C:rec2lays) so it runs on load. I don't understand @iztok14 why your bothering making a layout that reflects the rectangs in "Model", you can say plot all rectangs in Model without having to select. Plenty of sample plot lisps out there.
  1. Load more activity
×
×
  • Create New...