Search the Community
Showing results for tags 'list'.
nativedog posted a topic in AutoCAD Drawing Management & OutputI came across this command in another office they had called nlist that activated the attached screen in Autocad 2013 MEP. I initially thought it was an out of box command but have found it wasn't. It's very helpful in isolating an object that is in an xref'd drawing to either freeze it or change lineytpe, etc.. Does anyone know how I can recreate?
Make a loop return the result for each time its body is obeyed
dak posted a topic in AutoLISP, Visual LISP & DCLHi everyone, Just trying to pass a list of points to a "pline" command. The problem is num of points is initially unknown, though being calculated within a routine. The following code (as smth to start with) evolves known num of points. (defun c:pltest6 () (setq pts (list '(0 0) '(0 10) '(10 10) '(10 20) '(20 20) '(20 30) '(30 30))) (setq ptqty 7) (setq ptnum 0) (command "pline" (car pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) (pt_retr pts) "" ) ) (defun pt_retr (lst) (setq ptnum (1+ ptnum)) (repeat ptnum (setq lst (cdr lst)) ) (setq pt (car lst)) ) Repeat/foreach don't do, 'cause they return the value of the last iteration.. Now my Q is, is it possible to modify the code above to use loop instead of repeat one and the same line (moreover, unknown number of times ), OR some other approach would rather fix the task? Thank you in advance, Dmitro
Wave dynamic block
gegenytibor posted a topic in AutoCAD Drawing Management & Output
Dropdown list on block
Craisbeck posted a topic in AutoCAD 2D Drafting, Object Properties & InterfaceI would like to add a drop down list to a block. I would appreciate any help in getting this set up. Ive done a fair amount of research and it appears that things much more complex can be done but this simple task has me stumped. Background: We use the same block (symbol) to represent several different part numbers, but would like to select from a drop down list the actual part number. For example, a beacon symbol is the same no matter what color the beacon, but i would like to be able to select a grip and choose red, green, blue, yellow, ect. I don't want it to do anything to the block, but rather just store the property that is set by the user. Any help would be greatly appreciated. I'm sure this isn't that hard, but i cannot figure it out. Thanks
CADproNY posted a topic in AutoLISP, Visual LISP & DCLI am trying to create a dropdown list, what I am looking to do seems simple enough in theory. Just like excel I want to create a data validation (list). option 1, I have read several post's with people who seem to be trying to accomplish the same thing, the answers I am finding are basically saying to paste a link to the excel file. This would be great except the folder the excel file would be in is always re-named from (template) to a specific job name, thus causing my link to break and teaching everyone in the dept. how to re-link the file seems like a pain. option 2, I was thinking of doing a visibility state on an mtext or attribute, I couldn't get the attribute to change visibility states and the visibility state for mtext does not seem like the right solution. option 3, using a table or data extraction in CAD from the pasted in excel file, thus allowing me to create the drop down list. Attached are 2 pictures of the what I am working with, we use an excel file to write out a list of materials (always different) and then we have to re-type or copy and paste these materials into the titleblock. We are using ACAD Arch 2012 & 2013 Thanks in advance for any advice, macros, or solutions !Problem = Need drop down list ---> Want to select the W# ---> Want the description to populate the titleblock from CAD table or excel
Filter a Layer List for List Box
waders posted a topic in AutoLISP, Visual LISP & DCLHey All, Is there away to filter a layer list so it doesn't show all the layers in a list box. I want to see only the "Xref-*" layers. I do need the wild card because after the hypen the names vary. Also feel free to offer other suggestions or ways to attached code.Thanks test.dcl test.lsp
filtering out identical plines from a list
jeremyearle5 posted a topic in AutoLISP, Visual LISP & DCLI'm trying to filter out plines that are duplicates of each other from a list. I've been trying to compare 1 point in the first pline against the list of points from the other plines. They will only share a point if they are identical for this use. I've been trying to work this out on my own but it has becaome a complete mess and I know there must be a simpler way. This code works but has no way of checking the last pline. comparepts is a list of lists of the points on the plines nubpaths is a list of the pline entity names Help if you can please. (setq compctr1 0 ctr 0 numnubs (length nubpaths) nlist (list) ) (while (< compctr1 (- numnubs 1)) (setq compctr2 (+ compctr1 1)) (while (and (< compctr2 numnubs) (not reject)) (setq complngth (length (nth compctr2 comparepts))) (setq compctr3 0) (while (and (< compctr3 complngth) (not (equal (car (nth compctr1 comparepts)) (nth compctr3 (nth compctr2 comparepts)) 0.00009))) (setq compctr3 (+ compctr3 1)) ) ;_ end of while (if (/= compctr3 complngth) (setq reject T) ) ;_ end of if (setq compctr2 (+ compctr2 1)) (if (= compctr2 numnubs) (setq nlist (append nlist (list (nth compctr1 nubpaths)))) ) ) ;_ end of while (setq compctr1 (+ compctr1 1) reject nil ) ) ;_ end of while
[HELP] Convert Block to 3Dsolid
Pintoleite posted a topic in Student Project QuestionsHello to all, I am new at forums, this is my first post, but i expect to remain here. I am an Autocad noob (started this year at college). Our exercise was to create this Construction Detail in 3D using autocad, I made most of it but in the end i just made it using SketchUp and then converted to Autocad. The problem is that my professor wants all the 3d stuff, 3DSOLIDS. But all there is in my model is BLOCKS. (i use cmd LIST to check). Do you know how to convert these into 3Dsolids? Its very important. Thanks! BTW, i will leave attach the file so you can have a look at it better. File Link: http://d.pr/mpyF (If you are an Autocad pro and don't mind converting all those blocks to 3dsolid, that would be perfect, but i am here to learn too so an explanation is always welcome. I hope one day i can help around here:) ) PS: out of curiosity, i recorded most of the process and speeded it up:
Create a BOM for list of Xref?
arzie2000 posted a topic in Mechanical & MDTI'm quite new with the BOM thing with Autocad, though I have used xref a lot. Is there a way to create a BOM or at least a list/table of the xrefs I have attached to the drawing with the number of times used or occurrences in the drawing? The drawing I made have about 50+ xrefs and some of it is attached more than once, if i'm going to use the AMPARTREF, and made a reference on an xref, i have to input the quantity manually. Is there a way to automate this?
AutoCAD Block List Extract
CaveMan posted a topic in .NET, ObjectARX & VBAGood Day Have a Drawing that has symbol blocks in it. Blocks are not inserted into drawing - so no instances. How does one view the list of blocks in the current drawing. Any assistance welcome "This is probably a basic routine" Thanks in Advance
Keynote List Loading / Reloading
magic_man1 posted a topic in Autodesk RevitApparently I do not add keynote lists very often. To be completely honest, I have not used Revit in several months. Now, I seem to have forgotten how to re-load my Keynote list once I have made changes to the .txt file, that is, without closing and re-opening Revit altogether. From what I read, I should be able to do this without closing out. Could someone remind me how to do this? (And yes, I feel quite silly asking this question, when I knew what I was doing originally) Thanks for your help! FYI.. I am using Revit MEP 2011
Block Attribute Drop Down List
ryank7 posted a topic in AutoCAD Beginners' AreaI have created a generic title block for all my drawings and I have some attributes for the block. Is it possible to have a drop down list for an attribute so I do not have to type in the value/text each time? If so, how? I want to be able click on 'customer 1' or customer 2' ect. and not have to type it in the attribute. I'm using Autocad 2011.
parts lists problem
derranged cadder posted a topic in Civil 3D & LDDUsers of 2010 and 2011 Civil 3D (32 and 64bit) in my office using either windows xp or windows 7 are unable to add part sizes to part families in the parts list. This problem has been affecting us for awhile and we are in the dark on how to go about fixing it. The problem affects everyone in this office so it cant be just a local computer problem? Here is the scenario we are able to re-create, doing a fresh install of Civil 3D solves the problem but then after shutting down and logging back in the problem starts again. Therefore eliminating the possibility of a broken pipe catalogue? Also we have tried multiple catalogues on different drives and also the one in the C drive to no avail. Our conclusion is that something changes after logging off and windows? is unable to read the xml files in the pipe catalogue. Attached is a picture of the part size creator dialog box we are getting which as you can see is short of the options for adding multiple sizes etc. Tried not to bore you, hopefully everything is mentioned, any help is greatly appreciated. Anthony
eg0n posted a topic in AutoLISP, Visual LISP & DCLI want to fill an array with the elements of a list. The problem is that when I want to define the dimensions of the array, the upper bound depends on the length of my list so I use the following code: (setq array (vlax-make-safearray vlax-vbDouble '(0 . (- (length newlist) 1)))) and I get a "bad argument type: fixnump: (- (LENGTH NEWLIST) 1)" error. Any ideas would be really helpful. :?
Need help finding a Lisp
bfloresf1 posted a topic in AutoLISP, Visual LISP & DCLLooking for a lisp that can look at the coordinate X and Y of and object, like X 1.256998856, Y 1.25366544556945 and move it to .005 snap. (X1.260, Y 1.250) Can anyone point me in the right direction?