The only stipulation is my company uses AutoCAD 2012 LT. I am not familiar with Lisp/VBA programming codes but I have done an "appload" before, but that does not work with LT versions.
Question:
How do I update multiple template blocks based off of the first template? Currently we have been using one primary drawing sheet and are now going to be implementing a detail sheet.
I am using Mech 2007. I have created a template to use with new drawings, and want to know if there is a way to update all the drawings at the same time when updating the template.
I am trying to update blocks from a selection set and based on two specific attributes. I get and error eLock Violation
Not sure where it comes from since this is a dll.
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Dim ed As Editor = doc.Editor Dim x As Integer = 0 Dim tr As Transaction = db.TransactionManager.StartTransaction() MsgBox("Going into attribute write", MsgBoxStyle.OkOnly) Try Dim idArray As ObjectId() = selSet.GetObjectIds() For Each blkId As ObjectId In idArray Dim blkRef As BlockReference = [Code]........
I'm working on a program that cycles through each paperspace layout in a drawing and updates the sheet number and total quantity of sheets in the titleblock attributes. I've updated the block attributes in paperspace before, and it worked fine. Now that I'm trying to cycle through each layout, I cannot get it to work. I have attached my code. I beleive it starts to cycle through the layouts, but it fails when I try to grab the attribute collection.
Public Sub UpdateSheetNumbers() Dim doc As Document = Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Dim ed As Editor = doc.Editor Dim layoutCount As Integer =
I seem to recall there is a method of substituting old drawing templates with the latest version on open drawings, but for the life of me can neither remember what the command is or enter anything into the ACAD Help search that results in anything remotely useful .
I was curious to see if there's a way to set up Autocad (2010) to recognize when MTEXT objects are edited, and have it adjust their defined width automatically (both single- and multi-line)--versus having to click on the arrow every time to snap the text box "margin" to the actual text. I'd like to do this to keep my background masks the exact width of the text; I just hate it when the mask doesn't cover enough of the text, or when it covers more and the background is unnecessarily obscured. I'm careful about keeping things neat, but my coworkers aren't .
So I am Loving the use of Attout and Attin for updating block attributes from a spread sheet...Currently I am producing drawings with names on desks. I have created a block with the attributes of Name and desk.
I am currently updating the drawings blocks so that I can input an excel spreadsheet with over 1500 names into the drawing using Attin (changed the .xls to .txt and roberts your mothers brother)
Unfortunately the spreadsheets I have been given have the name as one field. i.e name: Joe Bloggs, Ideally I would have the information as First Name: Joe last name: Bloggs and create two associated attributes which would enable a nicely displayed block..
is there any way that I can format the block so that the attribute displays as a multi line..e.g.
Joe Bloggs
not
Joe Bloggs.
I know I can go into each attribute (although trying to remember that command "A something Edit" I think) and edit it like a piece of txt. I would rather not have to go and do that if there is another work around..
I know you can "pull" styles from a drawing (maybe the template) into your current drawing.
Is there a way to "push" them from the current drawing to another on?
Here is what I am picturing:
Right click on a style on the settings tab and choose "Send to Template"
"Template" would either be a predefined DWT file or it would open a standard file selection dialog to select one.....and this would copy the selected style into the template.
Is there a way to have a part, which is a part of a larger assembly, get the title, subject, etc. from its parent assembly? I have my template set to use the "Title" property in my title block but I'd like each individual part drawing to pull that "title" from the assembly, not from the part itself.
I work with land surveying, and I'm a complete newbie to CAD. I use AutoCAD LT 2010, and I am having trouble getting some coordinates from a file.
I receiveda dwg file containing three adjoining lines and two ducts. Now I need to extract the coordinates (x,y) and some kind of point number/name so that I can use the data in a text file or in Excel.
I have tried the ATTEXT command, but it doesn't work. I don't even know if the template file I created is correct, because I suspect the main problem lies in the fact that the points along the line have no attributes.
how do I get the data I need? Do I have to assign attributes to the points before I can extract the coordinates? And what should the template file look like?
I have a drawing that has about 450 identical instances of a block. The block has visibility options to show different things. I don't want to edit the block as there isn't anything wrong with it.
What i need to is update the blocks all together to change visibilities.
I am trying to update the text in the idw title block externally via excel or ilogic. I know of the iproperty of the part or the iam and that being able to be incorporated in the idw title block. But is there any way of linking an excel file to the idw so once the excel file is changed it updates all the idw title blocks it references?
Assembly comprised of multiple components all derived from the same master sketch "4 Inch Rail Master Sketch"
Using the sketch to drive geometry, using the parameters to drive various extrude lengths.
Geometry changes seem to propogate quite well, while parameter changes do not...is this a bug or am I doing something wrong? Generally have to open each individual part and "edit derived part" to force changes to propgate...
files attached (move end of part marker down for all .ipts).
I have a requirement to extract attributes from multiple AutoCAD files (500+) and export it to a text file or multiple text files. The purpose of the extraction is to find the total count for each of these attributes for BOQ and procurement purposes. The extracted data (in text or CSV format) will be loaded into another application. The tool to do the bulk extraction should be a command line tool to be called from the application that will load the data.
I have to update a block in literally thousands of cad files. I have the book "AutoCAD Secrets Every User Should Know About" and the author gives examples of this by using a Batch File, Script File, and then Lisp Routine. Any easier way to do the following:
Insert "Gennnotes=" (updating the block) into any drawing that has this block in the drawing already, if not Quit.
Typically to do this I would open the drawing "insert" "gennotes=", then cancel the command and save the drawing. I have a lot of subfolders that also hold drawings so the command would have to search through each subfolder for dwgs.
Like I mentioned above, I tried to use the Batch File/Script Method but my batch file failed. It could find the folder Autocad 2012 - English. For some reason it was not seeing the spaces in between. Not sure. Here's the batch file portion of the routine:
Batch file:
For /r C:Sybex %%f in (c:sybex*.dwg) do start /wait C:ACAD2012Autocad 2012 - Englishacad.exe "%%f" /b C:gennotesupdate.scr
In my title block I have a attribute with the name project_Number. Now what I want to do is the following. When I edit my block with the project number. The project number should automatically be added to a text box without me typing in the project number twice.
E.g.. This Drawing is part of the consulting services provided for Project[Project_Number] and may not be used or applied for any other purpose without prior consultation.
in other word the project number should be reference in the text box from the attribute.
Is there any way to edit multiple attribute properties, NOT using battman? While battman will chnage every att-block within the drawing, I'm looking for a way to change the text size of one specific line of text within an attribute, and ONLY change it in a certain few within the drawing. It'd be nice if I can select those specific blocks and change the properties in the properties manager, but it's not an option.
I have a CAD file with property parcels in it. It has come from an external contractor and from a GIS program of sort sort I believe.
If you click each 'boundary'/land piece, it is a block/object (not a proxy graphic) and in the properties pane window, there are attributes that has the lot number, the lot area, parcel number, other info etc in it.
Each block is irregular and different, i.e. they are not all the same rectangle block repopulated, they are different blocks.
I don't know much about attributes in AutoCad althoguh after reading about them, is there some way to edit an attribute (make it not 'invisible' and to increase the text size of its display) when it is already in several hundred different blocks? The only way I could work out how to do it was to go into every block and do it.
I also tried using the ATTSYNC command to update blocks with attributes although that requires me to individually select each block/give each blocks name.
I also tried using the DATA EXTRACTION wizard and was able to extract the attributes into a table/excel file, although that is not really good enough as I need the attributes displayed over the CAD data so you can see what parcel of land the attributes are referring to.
Any better way or a lisp command to do this? Clicking each block/boundary/land unit to place a label over it would also be okay. I just don't want to have to manually create the labels from reading the property pane, there must surely be a better way,
I am designing a solar field and have my solar panels laid out in a grid. I have each panel represented as a block with 4 attributes: Column, Row, Module Type, and Combiner Box. There are ~5,000 panels so it will take forever to modify the attributes of each block individually. Is there a way I can select multiple blocks (an entire column for instance) and set the "Column" attribute for ALL of those blocks to the appropriate value?
My end goal is to be able to export the information in those blocks to excel. So if there is any way to tie 4 pieces of information to an object and export it into excel not using block attributes, that would work for me as well.
I attempted to use Lee Mac's Batch Attribute Editor BAtteV1-4.lsp and it was very close to what I needed. But it will modify the specified attribute of all blocks within a drawing, whereas I only want to modify the attributes of all blocks within a selection.
I have a group of blocks, when I click the blocks I get the editable attribute pop-up box. I can now enter a text of my liking.
I have now made a dynamic block of these blocks, with a visibility states dropdown. So that only one block is shown at a time and when I need to change it I copy the block and use the dropdown button to select the one I need.
The problem I have is that the when I click the blocks from the dropdown only one of them allows me to use the editable attribute pop up window. The others say 'The selected block has no editable attributes'.
If I can't have multiple blocks with editable attributes in one dynamic block or if I can and have done something wrong.
I've attached the block so you can see what I mean. Single Socket allows editable attributes others wont.
I have a number of attributed dynamic blocks with multi vis states, that I wish to change from attribute text width factor 1, to 0.85, as per client specified requirement for the particular project. There are quite a number of different named blocks on each sheet, copies of each block, and quite a number of sheets involved.
Using BATTMAN or EATTEDIT I cannot select all attributes and change width factor in one go. It can only be done one at a time, a laborious task at best. GATTE appears not to be able to change width factor.
Any method of selecting all attributed blocks in a sheet, then changing the attribute text width factor on all to 0.85 in one fell swoop?
i have a standard template(page layout) DWT file, that i need to apply into multiple drawings. is it possible to create a scipt for that cause i have 100 dwg that already has a template that i need to replace by the new one.
I know how to retrieve the entity information from the block, but can't figure out how to write the loop statement to loop, look for first attribute, assign to a variable, goto next attribute, assign to different variable, etc., etc...
In my research, most programs I've seen it execute the loop, assign to a variable, then print/put that data somewhere, loop again and utilize the same variable to print/put the next data somewhere.
I would like each attribute within a block to be assigned a separate variable.
We wanted to automatically fill a block's attributes from a selection in Excel. I have a piece of code that has the user select/pick a block to fill. What I want is for the selection to fill multiple blocks in an active drawing. Some of the blocks are the same - which means the same tags/attributes. I've included the code that allows the user to select the block and throws the Excel selection to certain attributes.change the code so that
1) I don't have to manually select blocks - it will find them.
2) One cell (from Excel) will go to multiple blocks - some are same block name.
3) An IF statement that if a certain cell isn't blank/nil
(pretend it would be (nth 21 vl) change DESC11 to XYZ and DESC12 to ABC. For Block namesake we'll call one, BLOCK1 (say it has 3 instances and gets different info in each case) BLOCK2 (say it has 2 instances, also gets different info) BLOCK 3 AND 4 both have an attribute - DESCAA1 that gets different info from Excel.
I have a block which includes some Multiple lines attributes.
Now I don't want them to be multiple lines any more.
How can I change them to single line attribute?
In the block editor, the "Multiple lines" in the properties palette is gray out. I have create single line attribute and replace the multiple line attributes one by one.
Why don't make the Multiple lines property editable? This problem is since Multiple line attribute first time introduced.
Interesting thing is single line attributes can easily changed to multiple line attributes through the properties palette!