Jump to content

Search the Community

Showing results for tags 'blocks'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. I'm looking for a way to extract the X, Y and Z values from a set of selected blocks (there may be several types of blocks) and then have it export to a txt file. I'm not sure if it's possible but I'd like to have it export in the order that the blocks were placed. The format I'm looking for would be like this: x,y,z x,y,z and so on... I can do it in Microstation but would prefer an Autcad Lisp. Any help is really appreciated!!!!!
  2. I have similar blocks of drilling points on a map and wish to assign them to different layers to color them differently. How can I select blocks by their name, or part of their name, instead of handpick the individually? I also have Civil3D if that helps Thank you
  3. I have difficult time finding a command that would match a block's attribute (text height, text rotation, and text scale) with a source block. I had found a LISP routine that would match the block itself with a source block but it did not include attributes. I don't need to match attibute values, just the properties. I'm using AutoCAD 2012 with regular blocks (not dynamic)
  4. Hey guys! How's going? Can anyone help me? Look: i need to place a lot of blocks in an extensive polyline but the blocks need to have a specific distance from the polyline beginning - and this distance will not be equal to each block. So, i thought in create a list (excel or csv file) and specify each block name and distance to the lisp read the archive and place the block at correct point. Did you get it? PS: remember that the blocks will not have the same interval distance. This is an example for the list layout. And the result is something like this: I hope you guys could understand and help me! - sorry for my english - Thanks! Much love from Brazil Wellington Moura
  5. Okay. To start out. I've been out of the game for a few years but now I'm back. And I have questions. I'm going to start out with just by listing the two questions that I have and then wait for the conversation to begin. In past, my interactions and conversations have always turned out good. 1. Autodesk still has not provided a solution for mirroring blocks with dimensions and text? I have been forced to mirror all of my geometry and then go back through and mirror (to unmirror) my blocks. I am just curious if there is a solution for this or if anybody has some slick list routine that takes the pain away from having to do this. Maybe somebody has developed a mirror command that actually doesn't mirror the block but just mirrors the distribution of the location of the blocks... 2. I have inserted into my blocks a field to produce the square footage of hatching that resides in the blocks and when I utilize the data extraction tool, I'm not presented with the area for the hatching or the field for the square foot. I have to imagine that I'm doing something wrong there, but I'm really not sure what is set up incorrectly. Okay so there are my two questions. I do apologize if there are topics created or solutions for these exact items, but I was unable to locate anything. I've spent a better part of 2 days working through this and more hours spent on problem solving than I'd like to admit. I had to run out and grab the kids but I can produce drawings if necessary soon as I get back to the desk. Thank you and I appreciate everybody's time that can help me out. Nate
  6. JDPANTANO

    Block not functioning

    Afternoon! The issue I'm having is when I import a block from a different file, the attributes stop functioning. I can manually adjust them, but I cannot adjust them by entering a value in the properties. I haven't had this issue before, even with inserting this block in other files. If i try to enter a value, it just goes back to default without adjusting anything. I have bordered the problem block with red. Thank you!
  7. Hi! I am just new here and also a newbie in doing lisp routines. I was wondering if there is an autolisp that could possibly delete a text value of a specific attribute text inside a block of a block. I don't want to totally delete the attribute, just the value. I already tried several examples on the internet but doesn't really get to my satisfaction and as to how I want it to be. The only available lisp routine that I found so far is just yes, deleting the value but only works if the block attribute is outside the title block or even inside the title block itself but not when the attribute block is already inside a block of the title block. I need to do this for over 80 drawings and I was hoping to not doing it in an old fashioned way of opening each drawing just to edit-in-place the title block and then deleting the value of that attribute. Can anyone help me please? that would be very much appreciated. Thanks in advance.
  8. Hi all, I have a rectangle in a block that is constrained so that the area will only ever be 12 sq.m. What I am trying to achieve with the constraints is to have it always be 12sq.m, and having no side greater than 4200mm long. I've limited one edge to a maximum of 4200mm, but when I try to limit the other direction to 4200mm, it doesn't seem to work. Any ideas on how to achieve this? I've attached an example file. Thanks in advance! Rectangle example.dwg
  9. Good day everyone, I like to merge three blocks attributes to one block with attributes. I'm not good at VBA. I hope someone correct the below code for me. Thanks Public Sub Merge_LnBLk() Dim ss As ZcadSelectionSet Dim UNode As ZcadText Dim UGL As ZcadText Dim UIL As ZcadText Dim DNode As ZcadText Dim DGL As ZcadText Dim DIL As ZcadText Dim LnLen As ZcadText Dim Size As ZcadText Dim GetPt As Variant Dim BlkName As String Dim NodeBlk As ZcadBlockReference Dim FromBlk As ZcadBlockReference Dim ToBlk As ZcadBlockReference Dim SizeBlk As ZcadBlockReference Dim objAttribs As Variant Dim FromobjAttribs As Variant Dim ToobjAttribs As Variant Dim SizeobjAttribs As Variant On Error Resume Next ThisDrawing.SelectionSets("s").Delete On Error GoTo 0 Set ss = ThisDrawing.SelectionSets.Add("s") ss.SelectOnScreen Set FromBlk = ss.Item(0) Set ToBlk = ss.Item(1) Set SizeBlk = ss.Item(2) GetPt = ActiveDocument.Utility.GetPoint(, "Pick where the block to be inserted") BlkName = "LNNode" Set NodeBlk = ActiveDocument.ModelSpace.InsertBlock(GetPt, BlkName, 1, 1, 1, 0) FromobjAttribs = FromBlk.GetAttributes() UNode.TextString = FromobjAttribs(0) UGL.TextString = FromobjAttribs(1) UIL.TextString = FromobjAttribs(2) ToobjAttribs = ToBlk.GetAttributes() DNode.TextString = ToobjAttribs(0) DGL.TextString = ToobjAttribs(1) DIL.TextString = ToobjAttribs(2) SizeobjAttribs = SizeBlk.GetAttributes() LnLen.TextString = SizeobjAttribs(0) Size.TextString = SizeobjAttribs(1) objAttribs = NodeBlk.GetAttributes() objAttribs(0).TextString = UNode objAttribs(1).TextString = UGL objAttribs(2).TextString = UIL objAttribs(3).TextString = DNode objAttribs(4).TextString = DGL objAttribs(5).TextString = DIL objAttribs(6).TextString = LnLen objAttribs(7).TextString = Size NodeBlk.Update End Sub TestBlocks.dwg
  10. Joe_joe

    Rename blocks

    Hi, Does anyone have a lisp that will rename blocks? I'm hoping to find something with a list in the lisp with the old and new names (if name doesn't exist just keep checking through the list). I haven't been able to find anything online which does what I was hoping and my skills when it comes to coding are pretty minimal. Thanks, Joe
  11. Hi, I haven't noticed the units check box when creating a block before, but the default seems to unit less. What are the pros and cons of defining the units to milometers? I've only just noticed when using Wblock command for the first time that there is the option to define the units. What difference will it make if some of my blocks are unit less and some are defined as millimetres? I always work in the same units so is it irrelevant which i choose? What are peoples experiences like with changing these settings? Thanks in advance SC
  12. Hello. I made this lisp years ago and haven't used it for a while so now it can't insert attributes when inserting block (window for writing attribs pops out). I can't figure out how to resolve that so any suggestions? (DEFUN C:uvb(/ f name coords textline textposition ) (defun *error* (msg) (princ msg) (setvar "cmdecho" 1) ) (vl-load-com) (setvar "cmdecho" 0) (setq coords nil) (setq f (open (getfiled "Izaberi datoteku s koordinatama i visinama za upisivanje u blok" (getvar 'DWGPREFIX) "txt" 8) "r")) (or(setq scale(getstring "\nUnesi scale faktor [0.5]: ")) (setq scale "0.5") ) (while(setq textline(read-line f)) (setq prvi_zarez(+(vl-string-position(ascii ",")textline)1)) (setq drugi_zarez(vl-string-position(ascii ",")textline prvi_zarez)) (setq coords(substr textline 1 drugi_zarez)) (setq visine (substr textline (+ 2 drugi_zarez) (strlen textline))) (setq teren(substr visine 1 (vl-string-position(ascii ",")visine))) (setq vod(substr visine (+(vl-string-position(ascii ",")visine)2)(strlen visine))) (vl-cmdf "-insert" "41423-1" coords scale "" teren vod) (setq textline nil visine nil coords nil teren nil vod nil prvi_zarez nil drugi_zarez nil) ) (setvar "cmdecho" 1) (close f) ) ;;;the file must be in format y,x,h1,h2 block.dwg
  13. I found this simple lisp code related to multileaders that's working for me, but instead of the text reading 'Aluminum', I'd like it to extract the block's attribute definition. For example, I have a piece of equipment that I've given several attribute definitions to represent the equipment's tag identification, manufacturer, model number, price and so on. How can I get the multileader to read the block's tag identification attribute automatically without manually entering the text information? I'd like to be able to quickly call out different pieces of equipment or furniture with a multileader that identifies their unique tags. new lisp.lsp
  14. Hello Everyone, I'm working on a GIS Application which is running with AutoCAD, in that we are placing some lines and structures, while placing that the annotation will be placced automatically middle point of that poly line. after that we need to align that as per the below image. is there any possible to align the blocks automatically. steps would be Select two Blocks--->Select the Line then the blocks should be alined automatically as per the below image. can anyone help me on this. Thanks in advance. Sample.dwg
  15. This post is very similar to what I intended with rotating blocks by first determining True North and then new azimuth from true north (I succeeded in doing that one no perfectly but it does most of what I wanted). I did try, in the past to obtain some dxf entities from blocks but am clueless when I look at the result. I would like to see, in each drawing file: set an arrow block to North then with a magical lisp each time I enter the command I would like the an insert of the block with inputting new degree from the North to be inserted. and to top it off, if there is a way for the degree to show up on the #### that would be excellent. I also cannot figure out an efficient way to flip the text so it always shows the text correctly but that is another problem. Is there anyone that can cook something up for me please? in the past, BIGAL had helped me a lot in determining my block rotation but this seems it has a lot of DXF entity I cannot figure out! I played around with this lisp but cannot do much! (vl-load-com) (defun c:IR ( / centro angR Fr obj) (setq centro (getpoint "\nSelect Block Insertion Point : ") angD (getreal "\nEnter Rotation Angle for Block in Degrees : ") Fr (getstring "\nEnter Force applied : ") angR (* pi (/ angD 180.0)) );end_setq (command "_-insert" "r" "_s" "1" centro (angtos angR) Fr (strcat (angtos angR) "%%d")) (setq obj (vlax-ename->vla-object (entlast))) (if (< (/ pi 2) angR (* (/ pi 2) 3)) (foreach prop (vlax-invoke obj 'getdynamicblockproperties) (if (= (strcase (vla-get-propertyname prop)) "????") (vla-put-value prop (vlax-make-variant 180.0 (vlax-variant-type (vla-get-value prop)))) );end_if );end_foreach );end_if (princ) );end_defun (princ) Thank you Arrows.dwg
  16. Hey all, I have a block (attached) that I'd like to insert into a drawing and after it's placed I'd like to populate the "PointNo" and "Descr" attributes with some user inputted data. I honestly have no idea where to start and appreciate any and all starting tips or help. Thanks, JT COORD ID.dwg
  17. I made scalable blocks to mark trees ("AECC_COGO_POINT") using the tree XYScale, Easting, and Northing. As they are visible from multiple viewports each TWisted to the alignment displayed in them is there any way to have blocks or objects in them always display horizontal like Cogo Points?
  18. Hello Please I need help with my very very old lsp program. It has been made with my colleague in around 1998-1999. Now after a long time we need to edit it to add new block tags and make it count block we specify. We have been working on it almost a week but we really dont have a clue how to edit program after that time. I am asking for a help from some good programmer to help us solve this. All help is appreciated. Lisp file content: (defun f1 () (setq pocs 1) (pp) (if (/= aaa "") (f1a) (setq pocs 0))) (defun f1a () (setq pol (assoc aaa sez)) (if (= pol nil) (f1a2) (f1a1))) (defun f1a1 () (setq cis (cdr pol)) (setq cis (+ pocs cis)) (setq pom (cons aaa cis)) (setq sez (subst pom pol sez))) (defun f1a2 () (setq sez (cons (cons aaa pocs) sez)) (setq nav nil)) (defun f2 () (setq poc (length sez)) (if (> poc 0) (fl)) (while (> poc 0) (setq prv (nth (- poc 1) sez)) (setq zna (car prv)) (setq ccc (cdr prv)) (setq spc (- 16 (strlen zna))) (setq zna (strcat zna (substr " " 1 spc) (itoa ccc))) (write-line zna s2) (write-line zna) (setq poc (- poc 1)))) (defun f3 () (setq pocs 0) (pp) (if (/= aaa "") (f3a))) (defun f3a () (setq pocs 1 pozn (strlen aaa)) (if (= pozn 1) (f1a) (f3b))) (defun f3b () (setq pzn (substr aaa 1 1)) (if (and (>= pzn "0") (<= pzn "9")) (f4a) (f6)) (f1a)) (defun f4a () (fc) (setq pzn (substr aaa 1 1)) (if (>= pzn "A") (setq pocs ccc) (f5))) (defun f5 () (setq aaa (substr aaa 2) pzn (substr aaa 1 1)) (if (>= pzn "A") (setq aaa pzn) (f6))) (defun f6 () (fd) (setq pzn (substr aaa 1 1)) (if (and (>= pzn "0") (<= pzn "9")) (f7) (setq aaa pzn))) (defun f7 () (fc) (setq aaa (substr aaa 1 1) pocs ccc)) (defun fd () (setq pzn "x") (while (and (/= pzn "(") (> pzn "")) (setq pzn (substr aaa 1 1)) (setq aaa (substr aaa 2)))) (defun fc () (setq zn "0" bbb "") (while (and (>= zn "0") (<= zn "9")) (setq bbb (strcat bbb (substr aaa 1 1))) (setq aaa (substr aaa 2)) (setq zn (substr aaa 1 1))) (setq ccc (atoi bbb))) (defun fl () (write-line nadpis) (write-line nadpis s2)) (defun fp () (setq inp (open vyso "r")) (setq out (open "lpt1" "w")) (setq q (read-line inp)) (while (/= q nil) (write-line q out) (setq q (read-line inp))) (write-line " " out) (close inp) (close out)) (defun pp () (setq n 0 zn nil) (while (/= zn " ") (setq n (+ 1 n)) (setq zn (substr aaa n 1))) (setq pzn (- n 1)) (setq aaa (substr aaa 1 pzn))) (defun f8 () (setq nadpis "***** Svitidla dle symbolu *****") (setq sez sez6) (f2)) (defun c:vypis () (textscr) (command "attext" "s" "c:/blok/vypis/material" "c:/blok/vypis/pracovni") (setq pre (getvar "dwgprefix") nam (getvar "dwgname")) (setq n (strlen nam) nn 0) (while (> n 1) (setq zn (substr nam n 1)) (if (= zn "\\") (setq nn n n 2)) (setq n (- n 1))) (setq nam (substr nam (+ nn 1))) (setq zxc (strcat pre nam ".PRN")) (princ (strcat "\nJmeno vysledneho souboru <" zxc ">\n")) (setq vyso (getstring)) (if (= vyso "") (setq vyso zxc)) (write-line " ") (setq sez1 () sez2 () sez3 () sez4 () sez5 () sez9 () sez6 () c3 0 c6 0) (setq sou (open "c:/blok/vypis/pracovni.txt" "r")) (setq rad (read-line sou)) (while (/= rad nil) (setq sez sez1) (setq aaa (substr rad 1 15)) (f1) (setq sez1 sez sez sez2) (setq aaa (substr rad 16 15)) (f1) (setq sez2 sez sez sez3) (setq aaa (substr rad 31 15)) (f3) (setq c3 (+ c3 pocs)) (setq sez3 sez sez sez4) (setq aaa (substr rad 46 15)) (f1) (setq sez4 sez sez sez5) (setq aaa (substr rad 61 15)) (f1) (setq sez9 sez sez sez9) (setq aaa (substr rad 76 15)) (f1) (setq sez5 sez sez sez6) (setq aaa (substr rad 91 15)) (f1) (setq c6 (+ c6 pocs)) (setq sez6 sez) (setq rad (read-line sou))) (close sou) (setq s2 (open vyso "w")) (setq nadpis (strcat " Vykres: " nam)) (fl) (setq nadpis "--------------Zasuvky-------------") (setq sez sez1) (f2) (setq nadpis "--------------Spinace-------------") (setq sez sez2) (f2) (setq nadpis "--------Svitidla dle popisu-------") (setq sez sez3) (f2) (setq nadpis "--------------Ostatni-------------") (setq sez sez4) (f2) (setq nadpis "--------------Ostatni-------------") (setq sez sez9) (f2) (setq nadpis "----------Ulozeni vedeni----------") (setq sez sez5) (f2) (if (/= c3 c6) (f8)) (setq nadpis "----------------------------------") (fl) (close s2) (write-line "Vytisknout na tiskarne? (A/N)") (setq ano (grread)) (if (or (equal ano '(2 65)) (equal ano '(2 97))) (fp)) (read (chr (car (cdr ano))))) Then lisp have two templates 1.material zas c01500 spin c01500 svi c01500 ost c01500 rost c01500 sve c01500 test c01500 2.pracovni ST Z24V V3 V3S VV5 VV766 TOV66 VV666 VV566 VV166 ZV1 TOV VV7 VV6 V644 VV1 Z144 TO44 V744 V544 V144 V2 V7 Z1 TOS TO V1S V51 V66 V6 V5 V1 VYN KR pc ve p boiler N2 VY V SS1 SN SN1 SS Z2 ZST ZSTA DT VYM Z3 Z1P servo SC os iz HOP zem_svorka STM vz Z1v RauchAlarm Z2p ochranaT3 ochranaT3 ochranaT3 tr nap EP1 EP2 V5144 V6644 SSm klim PKZ ZMn VYMN Zm Stlak STH pc44 258 458 158 436 236 149 128 139 124 224 pasLED LEDp LED LEDm S4 S6 S5 vz44 Tx Rx S12 S13 S21 S22 S31 S32 900 120 150 Vm Scm Scs Scv Skm Sks Skv Nkm Ncm 150 60 90 120 Zvv66 V6S VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV6 VV1 VV6 VV6 VV6 VV6 VV1 S12 S12 S12 S12 S12 S12 VV6 VV6 ZV1 ZV1 ZV1 ZV1 ZV1 ZV1 ZV1 ZV1 V3S Z1 TO V1S V1 pc p boiler Z2 Z2p VYMN V6S ochranaT3 WSB4 All files in attachment. VYPIS.LSP material.txt pracovni.txt
  19. I need to explode the block and move all entities to given layer. Pl. give me a LISP code.
  20. Hi I'm getting back into cad and starting to develop some dynamic blocks. Can anyone give me some tips on how to do multiple visibility parameters in LT possibly using look ups. Should I be using blocks within blocks if that makes sense?. Does anyone have any ideas for creating electrical distribution boards using dynamic blocks with attributes. Your help would be much appreciated. Thanks.
  21. In Autocad 2013, when I highlight a drawing in model space and copy, then go to new drawing and paste to original coordinates, everything comes in fine except for blocks. the blocks get thrown far away from everything else. can anyone help
  22. Hello everyone, I'm facing a problem ... I have a lot of blocks in the air that need to be connected two by two with a certain polyline. I have a LISP code I've found on the net, I've modified the code, but the blocks do not fall vertically on polyline ... and I can not figure it out by doing the lisp code. I attached the dwg file and the lisp code for example ... I remain deeply grateful for helping:D Example code.dwg MY_snapToObj.lsp
  23. Hi, I have a Lisp that insert blocks, but some blocks requires a value to an attribute, and some not. So, I wrote the (command "INSERT" theBlock pt "" "" "" "") when the block requires a value attribute, its insert with nothing the last double quotes, but when the block doesn't requires a value the last double quotes calls the "HELP" windows. I have been thinking several ways to deal with it, like disable the HELP command, but the INSERT command still calling the HELP with the last commas. And verify if the block requires a attribute value before insert then, but I didn't find a way to do it. I appreciate any sugestions!
  24. I usually do extensive research before posting a question to this forum, but I have not been able to find the answer I'm looking for. I'm trying to create a lisp that asks you for a plane (getkword "X Y or Z <Y>:") Then pick a point (getpoint "\nSelect Point) Pick blocks (setq blks (ssget '((0 . "INSERT")))) Finally aligns all blocks to the selected plane. I have a Lisp that does this, except that when the blocks have attributes, the attributes stay in place and I would have to manually move them. I know that a way to do it is to select all blocks i want and go to the properties and change either the X Y or Z values, but that also seems tedious. Any help is greatly appreciated. Thanks.
  25. I am trying to adjust a block that I got from the AutoCAD Design Centre to my specific length but it would only grow / scale to its preset constraint measurements, EXAMPLE I want 2000 units but it has options of 1008 and 2016 units. Will Block Editor help me, maybe? AutoCAD 2015
×
×
  • Create New...