Search the Community
Showing results for tags 'insert block'.
Found 11 results
volkansahin posted a topic in AutoLISP, Visual LISP & DCLI need a complicated lisp for take information to attributes and choose blocks in cad file. So, I am working about Building Automation Systems, I am preparing "point list" and " connection diagram" for a project. My manager wants a lisp from me for choose blocks and insert data from excel point list automatic. Can anybody help me for it? I have not any idea about lisp language.( I am searching some solutions last 2 days. if possible, a lisp will look to point list, choose module type (there are 3 type modules, so 3 blocks.) and draw modules as example and will write module no, cable no (C1-xxx), equipment name and description to attributes. I attached point list and example blocks to here. Thanks for your helps. diagram_example.dwg point list.xlsx
Trouble with vlax-delete
3dwannab posted a topic in AutoLISP, Visual LISP & DCLHi all, Here's a routine originally wrote by LeeMac. I wanted to delete the previously inserted blocks after it's done updating them. Thanks in advance. I'll wrote where the problem lies in my code. (defun c:BK_Update_InsertAll_Redefine_ATTSYNCAll ( / dir doc extn spc ) (setq extn "dwg") ;; Extension of files to Insert e.g "dwg" (if ; (setq dir (LM:DirectoryDialog (strcat "Select Directory of " (strcase extn) " Files to Insert") nil 512)) (setq dir "W:/SS_CAD/SS_AutoCAD Block's Library/Blocks Updated/" blk "`.dwg") (progn (setq doc (vla-get-activedocument (vlax-get-acad-object)) spc (vlax-get-property doc (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace)) ) (foreach file (vl-directory-files dir (strcat "*." extn) 1) (vla-insertblock spc (vlax-3D-point '(0.0 -50.0 0.0)) (strcat dir "\\" file) 1.0 1.0 1.0 0.0) ) (vla-regen doc acallviewports) (command "ATTSYNC" "NAME" "*") ; NOT WORKING, I want to delete the previously inserted block. (vlax-delete (vlax-ename->vla-object spc)) ) (princ "\n*Cancel*") ) (princ) )
Run a Script (.scr) on multiple file
Jord_91 posted a topic in AutoLISP, Visual LISP & DCLHi, I need to run a scrit on multiple files and I would like it To chose wich SCR to run bas on the begining of the Name of the DWG File. In this case i have file with 2436, 3648 etc... and my scr would need to run the 2436INS.SCR on the 2436 ans same thing with the 3648 etc... I have try using Script Pro 2.0 But as it's openning a new file that has nothing in it it wont run proprelly the srcip. Here's my .scr Also Got it in Macro Command I would at least be able to run it in Script Pro but if someone is able to make a.bat or a lisp quith that it would be so fantastic I'm really sorry for my bad english! Thanks to every one!
Insert New RevBlock above existing RevBlock in Layout tabs
Fett2oo5 posted a topic in AutoLISP, Visual LISP & DCLWe are looking for a way to revise multiple layout tabs (single .dwg file) at one time. We design our product in 2D in one .dwg file. We use the layout tabs for multiple views of the objects that are in modelspace, (each layout tab has the project titleblock on it, but each layout tab has its own set of revision blocks.) We "stack" the revision blocks in the Y direction, please see first screenshot) There are times in the project when ALL layout tabs need the same revision description. For example, Issue for Construction, P.E. comments, As Built... etc. This was previously done by inserting the RevBlk, editing attributes, Copy-Basepoint, switching to each layout tab, and pasting above the existing RevBlk. So we would like to be able to insert a revision block into each layout tab using a dialog box or excel. Explained simply (hopefully): The routine would find the revision block (RevBlk) with the largest Y value (because we "stack" the revision blocks in the Y direction, please see example) and insert a new revision block (RevBlk) above it. The height (in Y direction) of the block is .1271, so the new RevBlk would need it's insertion point @0,.1271,0 in relation to the existing RevBlk with the highest Y value. Please see first screenshot: Our Layout Tab labels follow this sequence: Following that numbering sequence these are possible but not so frequent: It would be nice if we could control the insertion of new revisions from a dialog box: (the routine would need to detect what tabs were available?) I'm sorry for the way it looks, the only way I know how to make one is in Excel's VBA Also, I have a grander vision to define project parameters in Excel and then the appropriate blocks will be inserted (from the block library) into the new .dwg file. So I'm hoping this smaller task will help me along with the larger endeavor. InsertNewRevBlocks.dwg
Block size is driving me nuts
King Stevo posted a topic in AutoCAD Beginners' AreaHi all, Ok, so I am a newbie here (and to AutoCAD). I did attend a beginners 4-day course a few months ago (before I got CAD in work) and I've forgotten half of it. I started on a new template - changed 'units' to architectural as this project needs to be measured in feet & inches. I started a general floor plan (mainly by using straight lines to mark out rooms etc.) All fairly simply. Then I came to putting in doors and went straight to 'blocks' only to find that there obviously wasn't any there. Through the help of online tutorials, I've drafted a new block called 'door' designed it (straight line & arc etc.) and edited the block to apply 'stretch' and 'flip' commands. All ok. I set up a new layer called 'Doors' (just in case I want to hide them at some point) and set it as 'current'. When I inserted a block of the door - the scale of it is totally wrong? I went back in to block editor and the door is set up properly. The properties say all measurements are correct, but the inserted door is tiny. (I can obviously adjust it on screen to look right, but when I use the measure tool to check - what should be a 3'6" door it only measures 1'10" - even though it looks right?) I've tried block editor a million times - and tool palettes too, but I can't figure out why the door is not inserting into the drawing to scale? Please help - I'm hitting my head off a brick wall here... Thanks in advance.
Hello, I know this is a user error on my part, Bu I cannot figure this out for the life of me. My company have a set of blocks in a .dwg file on its own - let's say they are circles with radii that vary by 10'. In another drawing I want to divide a polyline using a one of these circle blocks at a specified number of segments. My process is to copy that block from its original file into my new file with the polyline - now I am able to list the block when I go through the divide command. MY ISSUE is when I complete the command, my block, as it is distributed along the polyline, is 1/12th the scale of the actual block I copied into my drawing. (it's something with the 12 inches are in a foot deal). It's like the divide command scaled it down...I can't explain why though. Both of my block units (the original file block and the one produced by the divide command in my new drawing) are set to inches and both drawing files are set to arch. - inches. The weird thing is that when I copy the block over into my new drawing it is at the correct scale. It is just this block - when brought in through the divide command - is scaled by 1/12. Thanks in advance,
insert block and make the force autocad updating TAGS
rodrigo_sjc_sp posted a topic in AutoLISP, Visual LISP & DCLHow to insert AUTOCAD block and make the force autocad updating TAGS?? I use this command (command "insert" (strcat "*"blockwithPath) (getpoint "\nSelect insertion point: ") "1" "0" "1")
Updating blocks from Ctrl/V
garygoude posted a topic in AutoCAD Drawing Management & OutputDoes anyone know how to update a block already present in a drawing with a block pasted from another drawing. I cannot use insert block with a file named the same as the block in the current drawing because the pasted block (of the same name) contains a visibility parameter that if I explode before inserting loses the parameters. If I insert the same named block within a same named file to the current drawing the drawing holds onto the original block because it is within a block. Am I making sense.... I am hoping there is a work-around this to update the block.
How can I get the outline of "Insert entity" ?
kenjung0730 posted a topic in AutoLISP, Visual LISP & DCLHi, all: I have a trouble with dealing Insert entity. I got a "Block" named "AA", which have one "lwpolyline" entities inside. And then I insert it with "scaling & rotating". The problem is, if I want to get the current outline of "Insert". My process is as below. 1. get "Block entity" from "Insert entity" 2. get "lwpolyline" from "Block entity" 3. transform the "lwpolyline" by vla-transformby(...) function with "Insert entity" rotation, scale ... parameters 4. draw the renewed "lwpolyline" on drawing as outline It works, but I think it cost a lot of times. Is there any convenient way to do this? thanks!
Inserting a block into a line.
cjenner0 posted a topic in AutoCAD Beginners' AreaIm having some troubles inserting a block into a line. See image. The block on the left inserts into the line and has attachment points (AutoCAD P&ID Provided) the block on the right i created. Im unable to get it to insert within the line without manually breaking the line after insertion, the result being the line through my block. Any ideas? Thanks. http://imageshack.us/photo/my-images/545/79756741.png/
Updating block references.
SAFeSTeR posted a topic in AutoCAD 2D Drafting, Object Properties & InterfaceOk so here's the situation... I have approx 150 files all with multiple layouts, each layout containing a legend block that needs updating. I edited the existing block and used WBLOCK to save it out ready for use in the other drawings. When I try to insert it into another drawing it gives me 2 options: 1. 'Redefine block - All block references will be updated'. 2. 'Don't redefine block'. When I try option 1 I cannot insert the block, I get this response and nothing gets updated: Block Notes_Block references itself Regenerating layout. Regenerating model. *Invalid* When I try option 2 it allows me to insert the block but it is this one that gets updated from the existing block in the drawing. I have even tried opening the block.dwg copy / pasting it but I get the same result... I really need some help with this because I need to get all these drawings updated today and doing each one manually will just take way too long. What am I doing wrong? Thanks in advance.