AutoCAD .NET :: Select Attributes From Block - Point Selection
Jun 18, 2011Is there a way to select attributes from a block if I pick a point inside the block?
View 6 RepliesIs there a way to select attributes from a block if I pick a point inside the block?
View 6 RepliesIs there a way to create a block with attributtes that automatically complete x, y, z, lat, long for the insertion point of the block?
I am trying to complete text in paperspace that will automatically fill in the lat long of a point in model space without using a table. I have tried field insertion with reference to a cogo point, but it doesn't give options for position on a cogo point. If I pick a block with attributes, it will let me pick any attributes, and x,y position for the block.
Cogo points show all the information I need to propagate in the properties....but how do I get that to translate into the text using fields or some other method?
Dell Precision T3600 - Windows 7 64-bit
NVIDIA Quadro 600
Intel(R) Xenon(R) CPU E5-1607 0 @ 3.00GHz 3.00GHz
8 GB ram - Two 1TB raid
How Can I Select All Blocks Attributes Using VBA Coding
all blocks with any name with any layer with any property
What order of operations do you use to include multiple attributes in a WBlock definition? I can't figure out to include all of attributes and have them in a specific order.
View 2 Replies View RelatedWhat method of block base point selection do you mostly use:
Screen selction point
WCS 0,0,0 point
When I select a block, all points contained in the block are shown. How do I turn this off? I want to select the block and have only the insertion point showing.
View 1 Replies View RelatedFor a program i am working for i have to extract the base point of a dynamic block.
This can be done perfectly by this function:
(cdr (assoc 10 (entget (car (entsel)))))
But i want the entity selected based on a previous slected point. So for example when i selected pt1 (which is a point at the border of the dynamic block) i want to be able to extract the base point on the block whit this point.
From the attached image you can see what I'm talking about.
(left=original, middle=ROTATE, right=PROPERTIES)
When I rotate blocks using ROTATE command everything is fine, but when I rotate blocks using PROPERTIES my attributes get messed.
I need to rotate several blocks at once with PROPERTIES, because I don't have time to rotate each one separately.
The same thing happens when scaling blocks, but this was resolved using the command BSCALE in the command line.
is it possible to create a block so that the base point is the only snap point on the block?
In other words supose I have a block of a simple rectangle with the base point in the center.
If I try to snap to the block, I will be able to snap to all the corners, but not the base point. I know that i can put a point at the base point, but can I turn off the snap to the corners (just for the block) in other words, have an object that is unsnapable to without turning the snap mode off.
When the block is in a drawing and I click it, it takes me to block editor.
However if I go to it in block editor and test block it allows me to change the attributes.
Why does clicking the block go to block editor and not allow me to change its attributes as it does when I test block.
I would like to change sub block from a visibility after setting it. Here an example of code to get the right visibility, I don't really know how to update a sub block by name or by handle(seems to change inside dynamic block).
Dim Block As AcadBlock
Dim BlockRef As AcadBlockReference
Dim DynEntBlock As AcadEntity
Dim DynObjRefH As IAcadBlockReference
[Code]........
I can insert a block with block attributes using the Inter op very easily:
Dim theBlock AsAcadBlockReference
Dim pickScreenVBA = myDoc.Utility.GetPoint(, "insert the hydrant")
theBlock = myDoc.ModelSpace.InsertBlock(pickScreenVBA, "Hydrant", 1.0#, 1.0#, 1.0#, 0)
Dim varAttributes AsObject
varAttributes = theBlock.GetAttributes
varAttributes(0).TextString ="3 Ports"
varAttributes(1).TextString ="Salt water"
Works great, but when I try using the non-inter op, all the example insert new Attributes and not add block with existing attribute (so I end up with duplicate attributes for each block - i.e "Salt water" attribute is added to the block each time I run the code),
Are they any examples that does the same as above using the non-interop code?
I'm trying to add some attributes to an existing block using the block editor, but after I save and close it I cannot see any 'placeholders' despite adding a default value and the attributes work fine when I double click the block.
I've tried using the ATTSYNC and BATTMAN commands but nothing works and there are no invisibility states applied to either the attribute or block and all layers are switched on.
I just tried making a quick block from scratch and it seems to have the same affect, except the default value will show, but no 'placeholder' shown if left blank.
I swear with previous version I could see the tag when a value hadn't been applied, so is it that the version I now use (2012) does not have this feature or it's disabled?
I'm trying to draw a plan of my house in Autocad 2009 but I seem to be endlessly using trim and extend because I can't easily select the points that I want with osnap. Eg. imagine I have a box, and I want to start drawing another box inside it that has each side as 10 units smaller than the corresponding side on the outer box.
Step 1 - I draw a small line from the top left corner of the big box using the endpoint snap, typing in "5" for the length.
Step 2 - I then do the same at right angles to the first line to get me to the starting point of the inner box. This always leaves me with 2 small lines to remember to delete.
Step 3 - Then in order to draw the top line of the inner box I end up drawing to a random length because I can't say "draw until 5 units away from the right hand side of the big box", then I end up trimming it later once I've repeated steps 1,2 and 3 for the next side of the inner box.
I know in my example above I could have scaled the box down or something but that's not what I'm getting at. I really want a way of selecting line start and end points that are a known position away from an existing point.
I'm trying to chnage the text of the sheet number and total sheet number attributes for each layout in my drawing. I have code that adds and deletes the specified pages, now I need to edit the attributes to reflect the correct page and correct total amount of pages. Here is my code, based on my old VBA version.
I know there is a problem with the line:
For Each item In myBTR.ObjectId
I've used a number of websites and books, but I would really like to find something that teaches about block tables, block table references, block table IDs so I can get a better understanding of breaking stuff down to get the info I need.
Public Sub updatePageNumbers()
Dim myDWG As Autodesk.AutoCAD.ApplicationServices.Document
Dim myDB As Autodesk.AutoCAD.DatabaseServices.Database
Dim myTransManForPageNumbers As Autodesk.AutoCAD.DatabaseServices.TransactionManager
Dim myTransForPageNumbers As Transaction
[Code]....
I'm inserting blocks into my drawing and the block has a basepoint and a 0,0,0 point. The CAD guy who usually works with me is off today but he has a keyboard method of switching between the 2 points when inserting the block.
Its a fairly straight forward thing on his keyboard, nothing he has set up but standard in autocad.
I've had a try hitting a few keyboard buttons this morning but can't seem to do it.
I have overlaid Autocad points on a polygon topology representing tree stands. I now want to somehow attribute the points so that the points within each stand are numbered sequentially in a top to bottom, left to right order starting with number 1 and prefix each point number with the stand number. These attributed points will need to be exported to a shape file for use in ArcGIS.
How this might be accomplished aside from manually typing in the attributes. I've considered using the Text Numbering tool in Express Tools but Map requires blocks for Point topology attributes. I've also considered object data but I don't see any way to automate the data.
I am using Civil Series/LDT/Map 2004 but I also have C3D 2011, ArcGIS 9.2, Microstation v8i Select Series 1 and Dotsoft Toolpac if any of those tools would offer a better approach.
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]........
using AutoCAD 2009 (vanilla)
I got too smart for myself today in bringing an old drawing up to current standards...Everyone seems to want their block attributes to be zero - I have blocks where the attributes are best when they match the rotations of each blocks.
I have an old drawing that was rotated (as it should be) at approx 2deg.
I used a lisp routine to global edit all the blocks that needed to be at zero. BUT for some reason (and after hundreds of blocks were corrected), I noticed I now have two blocks that should NOT have been in the set have had their attributes rotated to zero....and the attributes should be at the same rotation as their block's rotation.
Because those two blocks have a fixed tic mark, I can click on the mark to see what the block rotation is, then rotate its attribute to that rotation, but I have hundreds of blocks! One-at-a-time sucks....
Any chance there is a GLOBAL way to edit an attribute rotation to match its own block's rotation?
I have a drawing containing over 100 blocks with 8-10 attributes each. I want to align all the attribute text without rotating the associated blocks. I can select individual attributes by holding down the Ctrl key while I select each attribute. Then I can change the text angle in a pop-up dialog. Is there a quicker way to select all the attributes without having to click on each one? Remember that I do not want to rotate the whole block, just the attribute text.
View 9 Replies View RelatedIf you look closely in the attached picture, there is a spot of light blue on the player's helmet, that looks like a mistake (think it should look like the grass behind it)...though it actually may be part of his helmet.
Regardless, I'd like to take it out. My idea was to select the blue with the quick selection tool, then bring that selection out to the grass, select the grass with that size/shape of selection, copy/paste and then bring the grass selection into the blue part so it looks like grass in what was the blue part.
The problem is I don't seem to be able to move the selection without taking the blue with it (so it's not an empty selection and therefore can't select a piece of the grass.)
We're using C3D 2013 SP2. The survey company we use uses point styles to show the blocks. Say they shoot a catchbasin. Instead of inserting the block, the point shows up as the block.
I did a field check & needed to insert a missed CB. When I inserted the block, the other points that were CBs disappeared. I had to insert the block, copy it the clipboard, undo the insertion & then paste the block in. It did this on other drawings & other blocks.
I work with shapes all day designing mobile apps. Thus, I'm constantly selecting and resizing rounded rectangles. When resizing I have to individually select all four points of a side to move it without distorting the rounded corners. I cannot click and drag, because that will activate any shapes underneath the one I want to select.
I'm looking for a plugin or alternative to easily select the entire side of a rounded rectangle. IE - I click one point on a side, and it auto selects all four points on that side, or the like.
my problem is whenever i make a new block a stretch point appears even if its not a dynamic block . also its not a stretch point, because when i click on it, it just move the block , and it always appear on the coordinates 0,0 it cause me a problem when I insert the block , autocad use this point as a base point , and its very far from the real block .
View 1 Replies View RelatedI am learning autolips and i found a problem that i can´t solved.
(vl-load-com)(defun c:pmb ( / ss ent pt )(prompt "
selec block : ")(setq ss (ssget '((0 . "INSERT")))) (setq ent (ssname ss 0)), (setq pt (cdr (assoc 10 (entget ent)))) (command "point" pt))
wich this code you select one block and insert one point at insert point´s block.
which this other code yo select all block and insert all point.... but in one block
(vl-load-com) (defun c:pmb11 ( / sele cod bloque nbloque lista pt ) (prompt "
block: ") (setq sele (ssget ( List'(0 . "INSERT"))) Cod 0 )cod (1+ cod) (repeat (sslength sele) (setq bloque (ssname sele cod)) (setq pt (cdr (assoc 10 ( entget bloque)))) (command "punto" pt) );repeat )
I have a series of logos that we use. I would like to have them setup in a dynamic type block that would allow us to select the block and choose from a pull down that logo to use.
I have see it done before just don't know how to replicate it.
As you scrolled through the choices as each one was highlighted it would display that one on the screen.
I want to move the base point of a block in the block editor. However, when I move it, the block moves accordingly in the drawing.
How can i move the base point in the editor, so that the block stays at the same position in the drawing.
As a beginner i'm learning day by day how to use photoshop. Among the functions i 'd like to handle with there's the vanishing point (in the filter menu). However i can't modify the angles of my selection to change the perspective grid.
Take a look on this video at 03"57 (it is what i want to do): [URL] ...... Do i have to set something up before.
On Autocad 2012, can we select blocks with the attributes name?
View 9 Replies View RelatedI have some blocks that are associated with regions in my drawings. I want to select regions based on attributes in the associated blocks. Is that possible?
Is it possible to link my blocks to an external database and select the regions based on a field in the linked database?
I have all of my data in an Oracle database (Gas Enterprise Model). I need to join the pipe (Line) with the meter (point) in order to have the attributes of both for a report.
A query on geometry in Oracle definitely did not work and doing an overlay analysis in Map3D strips the attribute data when I create a buffer. There is nothing to join on for the tables, A Network analysis will not work because the lines are for services and don't have their connected distribution.