All Activity
- Past hour
-
Lee Mac started following Efficient way to isolate duplicates on a large list
-
Efficient way to isolate duplicates on a large list
Lee Mac replied to jbreard's topic in AutoLISP, Visual LISP & DCL
I'm unsure if you're looking to group the items by the MAT value or something else (sample data and the expected result would help in this regard), but I might suggest manipulating the data into groups using the MAT value as the key, i.e. (defun foo ( lst / ass rtn ) (foreach itm lst (if (setq ass (assoc (car itm) rtn)) (setq rtn (subst (vl-list* (car ass) itm (cdr ass)) ass rtn)) (setq rtn (cons (list (car itm) itm) rtn)) ) ) ) -
pkenewell started following Efficient way to isolate duplicates on a large list
-
Efficient way to isolate duplicates on a large list
pkenewell replied to jbreard's topic in AutoLISP, Visual LISP & DCL
Try Lee Mac's "List Duplicates" functions at the following link: https://www.lee-mac.com/uniqueduplicate.html#listdupes -
jbreard started following Efficient way to isolate duplicates on a large list
-
Efficient way to isolate duplicates on a large list
jbreard posted a topic in AutoLISP, Visual LISP & DCL
Hello everyone, I'm looking for a solution to efficiently extract from a given list all duplicates. I've got a solution that works in theory but that is ineficient in practice due to the length of the list I want to analyse (approximately 25 000 elements). The list I'm working with is a list of lists. All individual lists decribe a Covadis bloc (topography software) with the format (MAT, ALT, ALTI, (X, Y, Z), ename of the bloc). MAT, ALT and ALTI are attributes value of the bloc and (X, Y, Z) is the insert coordinates. I want to isolate all the blocs that have the same MAT attribute and save them on a separate list. I have come with the solution described in the code below but it's much to slow and absolutely not opimised. ; lst = general list with bloc caracteristics ; sublst format (MAT, ALT, ALTI, (X, Y, Z), ename) (while (setq sublst (car lst)) (setq lst_same_mat (vl-remove nil (mapcar '(lambda(p) (if (equal (car p) (car sublst)) p nil)) lst))) (setq lst_same_mat_save (cons lst_same_mat lst_same_mat_save)) (setq lst (REMOVE_LST1FROM_LST2 lst_same_mat lst_same_mat_save) ) ;;;; ;lst_gen : list we want to suppress certain element from ;lst_suppr : list of elements to be suppressed in lst_gen (defun REMOVE_LST1_FROM_LST2 (lst_suppr lst_gen / ele_suppr lst_modif n) (setq n 0) (setq lst_modif lst_gen) (while (setq ele_suppr (nth n lst_suppr)) (setq lst_modif (vl-remove ele_suppr lst_modif)) (setq n (1+ n)) ) lst_modif ) Would anyone have an idea on how to speed this up for large list ? Thanks and best regards, Jacques - Today
-
I created a parcel. I gave it a number and a name. I modified the default label to include the number, a slash, and the name. Now the parcel has a label that looks like what I believe you want. If that's not correct, please elaborate.
-
I want that the parcel number can be writen with / when desired....egsample 1852/3
-
It sounds like some fairly simple AutoLISP code would handle this. You'd have to specify where to get the data, how to format it, and where to put it. For instance, the "label" including the number of floors: is that a block, a piece of text, an annotation in Revit, or something else? Is the number part of a code with letters and numbers, or is it just one number? Would all the "perimeters" go to the same height or to different heights? What format would the layer names have, and is the floor number the only variable? There are a lot of blanks to fill in here.
-
Parcels have numbers (integers) but also names (strings). Do you want to format the name so that it includes the original number plus a slash, plus some other number (could be total parcels)? That could be as simple as changing the parcel label style. If it's something more complicated, you might need some code. I'm not sure what you want.
-
devitg started following Calculate and draw building plans
-
@PGia please upload your sample.dwg, before and after
-
Hi I’m wondering if this topic has been discussed in this forum before. In simplified terms, the issue is this: if you have a 2D perimeter with inner sub-perimeters, and within each of them there’s a label indicating the number of floors rising above that perimeter — would it be possible to create, for each floor, the corresponding perimeters on specific layers for each one? Does anyone have any idea how to approach this?
-
Aniruddha Raste joined the community
-
Butch started following Parcel number and name problem
-
Hello! Is it possible to create this kind of parcele name or Maybe on number. As you can see in the picture attach it symbol / between two numbers. 3/180. Its writen in blue color so you have to look a bit carefully....my mistake Thank you
-
Worachai joined the community
-
enzolan joined the community
- Yesterday
-
A couple of comments, the outside stairs use a rectang with a wipeout so it hides the windows behind. Also there is no inside support ? tr I am metric but not sure about 2x4 for rafters at that span, there is no @ what spacing. Ceiling 2 lines or even 3 with insulation shown. Concrete beam arrow did not point to it, and a conc beam should be shown as a "T" This detailing is wrong only show 12' beam not concrete at bottom. Cantilever balcony is shown wrong. see red lines. There is no way a 4' slab can cantilever that far. May need some help on structural layout of beams in slab. Enough from me, its about learning. I am sure others will comment.
-
Thank you for your feedback. It’s my first time working on this, so I didn’t realize I could upload the DWG file. I’ll share it so it’s easier to review. Thanks again for your time and advice! Drawing1.dwg
-
symoin started following Move any overlapped text and create a new line.
-
Move any overlapped text and create a new line.
symoin replied to Sheep's topic in AutoLISP, Visual LISP & DCL
Hi, please share the TTT lisp -
samg joined the community
-
qq787116960 joined the community
-
Yes, we should see the peak of the roof from one side and the ridge from the other. Unless there's a flat section in the middle.
-
Then post a .dwg file that we can downloaded and view better. Right off the bat your roof cut section should appear differently in the two sections. Judging by what I can see it's very similar in both sections. This will be my last comment. Good luck on your submission.
- Last week
-
Being a road designer for many years we would always sample wider than needed, as you suggest a small problem when a line ends on a face. Within the plot section you would set left and right limits so this would truncate a section to a fixed width, even though sections are wider. One clean up was we wanted natural surface to be wider than the design so would trim left and right section details to get that effect. Oh yeah the other is we always started a road before the actual start and after the end so could work out the blend correctly.
-
Excuse me. You're right. It's a combination of several things. Basically, the 'getfencesel' function, when the selected axis ends, with one of its ends, on one of the sides of the 3DFACEs it intersects, fails to capture that intersection and doesn't display it in the profile. This, in some cases, produces an error, and the command doesn't execute. There's something else, but I'll have to look into it later. When I'm done, I'll post the resulting code for anyone curious to try it out.
-
Thank you for taking the time to review my work. I appreciate your feedback. I just wanted to clarify that my question was specifically about the roof cut section.
-
Sakun joined the community
-
ozkanozgur joined the community
-
Re: roof. It's difficult to tell given the scale of the image above. That aside, I do have a few questions. Where are the closets in the bedrooms? Why are there no bathing facilities shown, like a shower or a tub, in either bathroom? Why are the hallways so large (almost room size)? Hallways tend to be much narrower than rooms. Where are the living rooms? And shouldn't counters/appliances such as a refrigerator, electric or gas range and a dishwasher be shown in your floor plan? Is the house completely wood framed or a combination of masonry and wood? Depending on the situation your sections would be different. Wouldn't a post or two be required under the first stair landing?
-
I’m sharing my drawing for your review. Could you please check if it looks correct? I think there may be an issue with the roof section, but I’m not sure what exactly is wrong.
-
Amine joined the community
-
Maybe post how you solved it for others.
-
keto joined the community
-
Magdonel13 started following ANSI B16.5 Flanges Lisp , How to use the LISP routines in this archive and ANSI B16.47 Flanges Lisp
-
I agree with what you said. (setq theblock (vla-InsertBlock mspace ip item xscale yscale zscale rot)) Editing the code like this fixed it. Thanks .
-
rlx started following Why is vla-insert different?
-
I think Steven is right , this is about redefining or not. When you insert a block without path , AutoCad uses the block definition allready present in active drawing. If you put a path to it , AutoCad will overwrite current block definition with the one on file. So , if you insert block for the first time , then edit it and after that insert the one from file , your edited definition will be overwritten again. Standard / classic / basic AutoCad behaviour.
-
I prepared a block dwg file and a example dwg file. And of course the lsp file for comparison. I deleted the inner part of the block in the example dwg file. Without deleting this block, add the second block using the commands in the lsp file. Note 1 : link for vla-insertblock >> https://www.afralisp.net/archive/methods/lista/insertblock_method.htm (I just changed the item line to select it) Note 2 : After using the "al-insertblock" command in AutoCAD, run the regen command. BLOCK.dwg EXAMPLE.dwg EXAMPLE.lsp
-
foxesak joined the community
-
Are you able to post a copy of the LISP so we can see what is happening? Sounds like your (command method is referring to the source file and the (vla- method is referring to your working file