AutoCAD .NET :: Unitless Block Insertion
Sep 11, 2013
If you insert a Unitless block into a drawing with the units set to mm or inches via the interface, AutoCAD will automatically take care of the scaling for you. By looking at the properties of a Unitless block after insertion it appears as though all CAD is doing is scaling the block in accordance with the units in the drawing.
How CAD is doing this calculation and how to get the same effect using the .NET API at the time of insertion?I could setup a function that examines the units of the block being inserted and the units of the drawing the block is being inserted into but how would i be sure i'm using the same conversion value as CAD?
e.g. I might decide 1 Unit = 0.0393 when i do the insert, whereas CAD might use 1 Unit = 0.03937007.
It would be nice to either use the same value or a function that the API provides that i'm not aware of to do the conversion
View 1 Replies
ADVERTISEMENT
Apr 5, 2013
Create a routine that looks for a block based on a portion of that block name, using a specified path or search path.
For example, block to search for is BLOCKABC123, so if someone inputs ABC or 123 as a block name, it will locate that block within that folder and inserts it into the drawing at a user specified location.
Ideally, if there is a check in that if it finds more than one match, then perhaps it flags or prompts you to choose 1, 2, or 3 option which block to use. But I can live without this special function if it requires too much time to code.
View 8 Replies
View Related
Feb 14, 2013
Is 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
View 9 Replies
View Related
Aug 3, 2011
I've been using the admittedly pieced together code in order to insert border blocks around a closed polyline. Yhe problem I'm having is that when the Block angle is say "zero" the block is inserted the same way both on top and below the polyline. Since the blocks surround the polyline the blocks on the downside should have an additional 180 degree rotation. How to deduct that the portion of the polyline is in a certain quadrant and adjust the insertion angle as necc? I 'm not sure thats even the best approach.
Dim pso As PromptStringOptions = New PromptStringOptions("Enter name of block to create reference: ")
Dim pr As PromptResult = myEd.GetString(pso)
Dim blkName As String = pr.StringResult
'If (!bt.Has(blkName)) Then
[Code] ....
View 1 Replies
View Related
Jul 31, 2013
I've inserted a block into my drawing with this
....
Dim tmpDb As New Database(False, True)
tmpDb.ReadDwgFile(nombrebloque, System.IO.FileShare.Read, True, "")
Dim Transform As Matrix3d = Matrix3d _
[Code]...
and I would like to change some properties (layer, color,...) of the entities. (without modify the original block)
How can I access to these entities?
View 3 Replies
View Related
Aug 11, 2011
I am using ACA 2009 and am experiencing something new with attributed blocks. When I insert the block, a copy of the block is placed at what seems to be an arbitrary distance away. As I fill in the boxes for each attribute, it appears in the image away from the insertion point. After I am done, the completed block appears filled out where it was inserted. I have never seen this before. Is there a setting affecting this?
View 2 Replies
View Related
Oct 4, 2011
I'm running AutoCAD LT 2011. As a test for myself when i first started using the program I created a block in which i have a rectangle and a linear stretch pair parameter attached to it, and a field attribute referencing the distance that the stretch parameter is stretched out to.
I'd like to know if its possible to set up a prompt when inserting the block into a drawing that allows me to type the desired distance of the stretch parameter and have the rectangle stretch to the entered distance as its inserted.
I'm trying to automate the process of simply inserting the block and then dragging the grips of the parameter out or updating the distance via the properties panel.
View 5 Replies
View Related
Nov 23, 2013
I have drawn some doors and saved them as blocks. Whenever I insert one or another, the door itself is far away from the insertion point. How can I modify this?
View 9 Replies
View Related
Mar 5, 2012
I have a polyline which consists of straight lines and curves in 2D enviroment.
I want to extract some coordinates. I usually use block refferences and "dataextraction" command. However, the problem is as follows:
I need to mark many things along the polyline's way at no constant intervals (not possible to "measure" it) If I have "osnap" on, I can't hit the spots I like for obvious reasons. If I have "osnap" off, I can't place the object accurately on polyline's way.
So, what I need is: how to allign multiple blocks to a said polyline. Allignment needs to be done as accurate as possible, prefferably perpendicularly to closest tangent of polyline.
View 2 Replies
View Related
Jan 31, 2013
I am inserting a block (strSectionBlk) into an AutoCAD 13 drawing using VB .NET. This block has an attribute with tag "FAB_HEIGHT" and I want to edit its string to the value of a variable "strFabHeight" at the time of the insertion of the block. The insertion of the block is fine but I've failed to edit the attibute.
Public Sub InsertSection()
'Call the Function that decides the name of the head section block strSectionBlk
getSectionDwg(strModel, strHeadType)
'Start the database
Dim db As Database
[code]....
View 5 Replies
View Related
Jul 30, 2011
I have a simple block, I would like to do the following:
Type: Insert
Specify: Block Name
Click spot with cursor to have the block placed
Rotate the block for orientation
I know that if I use the Tool Pallets I can specify rotate on insert, but do not always want to use the Pallete. I also know I can assign a rotation parameter to the block so I can grip and rotate after insertion. Is there an easier way?
View 4 Replies
View Related
Feb 20, 2012
I create a block where coordinate 0,0 is my base/insertion point (which is established in an orientation that is to the lower-left of my blocks line work). In a new drawing I insert that block and specify coordinate 0,0 as my insert point. Instead of my insertion point being in the lower left it is in the upper right. I run into this in new version and old version drawings.
View 2 Replies
View Related
Nov 14, 2012
On my civil drafting project plate 1 I am trying to insert my Tree block and i type the coords in and it ends up way off screen but I insert a point at the same coords and it goes right where it needs to. What am I doing wrong?
Figured it out on my own by placing my tree on origin 0,0 and then creating block. not sure why that is the way it is but I got it to work for what I need it to do.
View 9 Replies
View Related
Jul 17, 2013
Have a number of std blocks with a single part number located centrally within a circle similar to std grid line coordinates used on architectural plans.
Is there a simple way to set the block up with its part number fixed centrally so that when the block is inserted at different rotation angles the part number always appears central within the circle and upright.
Forget lisp as only have LT.how to centralise the text within an attribute so its always central when block is rotated.
View 6 Replies
View Related
Jun 29, 2011
I've been working on several projects that require drafting in metric units and I'm having difficulty inserting block dwgs. into my working drawing at the correct scale.
My block drawing is set to millimeters. I've drawn my block and measured it. All is ok.
UNITS = milimeters; INSUNITS = 4
My working drawing is in millimeters. All line work is dimensioning accurately.
UNITS = milimeters; INSUNITS = 4
When I insert the block, it comes in extremely small. When I click on the block properties, it says it's units are in millimeters and the scale is 1. As it should be correct? except for the fact that its about 25x smaller then it should be. This leads me to believe there is an inch insertion factor some where.
To add to the conundrum, if I xref the block dwg into my working file, it comes in at the correct size. Is there an alternative block insertion scale factor setting that I'm not seeing?
View 2 Replies
View Related
Jan 20, 2012
We are having an issue while inserting blocks from the tool palette. Inserting a block from the tool palette takes about 5 seconds per block. Pick a block, wait 5 seconds, pick insertion point. Last week it took maybe 1 second. It doesn't sound like much, but we use alot of blocks everyday, and waiting 5 seconds every time gets annoying. Especially when it used to be almost instantaneous. We also have our blocks in our template. The template is on the server. If you type insert, and insert the block that way, it loads fast, like it used to using the tool palette.
Most of the blocks are simple text or shapes. None are dynamic. We also have some hatches in there, that are unaffected by the delay. They insert quickly.
Another thing has changed. The time it takes to change to a different tab on the palette has grown. A tab with about 10 blocks used to take about 6 seconds to load, now takes a good 30 seconds. And a tab with about 30 blocks that used to take about 12 seconds, now takes about a minute and a half! Once the tool palette and each tab has been opened for the first time, say first thing in the morning when cad is first opened, the delay is gone. They switch between tabs with no delays.
The only thing that I know of that has changed that coincides with this is last week we made a few changes to the template. We removed a few sheets that we no longer use. Could this have done something? The blocks are still in the template. We have 3 pc's that are affected in the same way, at the same time.
I've tried a few things to remedy this. I am by no means a cad guru. I created a .dwg with all the blocks in it. Made another tab on the tool palette using the blocks from the .dwg. Still the same delay. I tried creating a new palette using the design center and the blocks .dwg I made, but cad locks up on me and I have to restart cad. I tried that twice.
View 9 Replies
View Related
May 30, 2012
Whenever I insert a title block I get an "AutoCAD Error Aborting" message - FATAL ERROR: Unhandled Access Violation Reading 0x0040 Exception at d69ac126h.
The title blocks have been working fine for months in ACAD2012, and I've even tried saving the drawing containing the blocks as an AutoCAD 2013 dwg to no effect.
The title blocks are 'home-made' and contain a mix of fields and attributes, could this be causing the problem?
View 7 Replies
View Related
Jan 19, 2012
We are having an issue while inserting blocks from the tool palette. Inserting a block from the tool palette takes about 5 seconds per block. Pick a block, wait 5 seconds, pick insertion point. Last week it took maybe 1 second. It doesn't sound like much, but we use alot of blocks everyday, and waiting 5 seconds everytime gets annoying. Especially when it used to be almost instantanious. We also have our blocks in our template. The template is on the server. If you type insert, and insert the block that way, it loads fast, like it used to using the tool palette.
Most of the blocks are simple text or shapes. None are dynamic. We also have some hatches in there, that are unaffected by the delay. They insert quickly.
Another thing has changed. The time it takes to change to a different tab on the palette has grown. A tab with about 10 blocks used to take about 6 seconds to load, now takes a good 30 seconds. And a tab with about 30 blocks that used to take about 12 seconds, now takes about a minute and a half! Once the tool palette and each tab has been opened for the first time, say first thing in the morning when cad is first opened, the delay is gone. They switch betweeen tabs with no delays.
The only thing that I know of that has changed that coincides with this is last week we made a few changes to the template. We removed a few sheets that we no longer use. Could this have done something? The blocks are still in the template. We have 3 pc's that are affected in the same way, at the same time.
I've tried a few things to remedy this. I am by no means a cad guru. I created a .dwg with all the blocks in it. Made another tab on the tool palette using the blocks from the .dwg. Still the same delay. I tried creating a new palette using the design center and the blocks .dwg I made, but cad locks up on me and I have to restart cad. I tried that twice, same result.
We are running AutoCAD Civil 3D 2010 on Vista Business 64bit.
View 5 Replies
View Related
Oct 18, 2013
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 Related
Nov 8, 2012
how I can quickly add points at the insertion point of a block? I have over 1400 and would like to find the quickest way to do it.
View 7 Replies
View Related
May 16, 2013
My boss gave me a drawing to make some changes on a particular block; however, every time I try to insert the block, it always insert the block in Paper Space even though I'm in Model Space.
Is there any way to change that insertion point? I want to insert the block in Model not in PS...
View 4 Replies
View Related
May 20, 2013
I need a function that accepts a block name as an argument and will insert the named block without fail no matter if the block was made to scale uniformly or not.
How can I determine if the block should be inserted like:
(command "-INSERT" blkn "0,0" 1 0)
or:
(command "-INSERT" blkn "0,0" 1 1 0)
View 8 Replies
View Related
Jun 16, 2011
how (if) I can set up my dynamic blocks so that I can set the parameter values as I insert the block, rather than with the grips afterwards?
To take a simple example; I have a block consisting of a rectangle, with 2 linear stretch parameters - length, width. Can I set it up so that when I insert the block, it asks for the length and breadth,just as it would for attributes.
View 4 Replies
View Related
Mar 7, 2013
wondering if is possible to have a lisp routine to:After use the INSERT command, the routine will automatically change the layer of the inserted block to a specific layer according of its name.
i.e.
Step 1 : I will insert a block named Block A using the normal autocad INSERT command (I do not want to insert the block without the Insert window dialog box)
Step 2 : After the insertion, the routine will select the last insertion (or the last object, or any other best way to select this block and will take it's name)
Step 3 : The routine has a list that says:
(If the last insertion (or object) is named Block A, put it in the layer Layer A with color Bylayer and linetype Bylayer)
(If the last insertion (or object) is named Block B, put it in the layer Layer B with color Bylayer and linetype Bylayer)
and so on... I can make the approprieated list by myself folowing my standards.
I think it will be nice to avoid an error if the block is not in the list. So:
(If the last insertion (or object) name is not in the list, do nothing)
To finish, it will be nice to create the layer if it does not exist. Also, Unlock, Thaw and Turn on the layer if it's Locked, Frozen or Off.
View 9 Replies
View Related
Jan 27, 2012
How can I find a block with a specific name and get what the coordinates are? What we have is our Bill of Material is attributed blocks. I am attempting to change the first one. Well all of the lines that list the parts are seperate blocks with the same name. Now the Top Line of the Bill of Material is a different named block. If I can find the coordinates of this block I can then select the first line to do what I need to.
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 3 Replies
View Related
Feb 6, 2011
I have insert blocks in my dwg. It is the circle. While creating the block, i was just pick the point into the circle not exactly at the centre.
Now i want change the insertion point of the block at centre of the circle without moving the objects from the dwg.
Beacuse i had use block editor to change the insertion point. But after changing, all blocks were moved from the original position.
View 4 Replies
View Related
Jun 16, 2011
I have several existing block definitions and need to change the insertion point. Also, when creating a new block in the Block Editor, how do I define the insertion point?
View 9 Replies
View Related
Oct 21, 2013
My multileader style uses a block as a content. How can I find world coordinates of insertion point of block entity within multileaders?
View 3 Replies
View Related
Sep 2, 2013
We have several AutoCAD drawings with hundreds of block references inserted with imprecise coordinates. Now we need to dimension all elements and need to correct these positions.
I am searching for a routine to round these positions up or down towards a 5mm precision so I don't have to manually move every single block element.
Is there any way to automate the task or do you know any workaround (like inserting the elements into a drawing with poorer unit precision settings)?
View 3 Replies
View Related
Oct 11, 2011
I've have code to test if the insertion point is within a closed polygon. But prior to testing the insertion point I use ssget to trim the selection set initially..
(ssget "CW" Pnt_List (list (cons 0 "INSERT")(cons 2 BlockName)))
this requires that the whole Crossing Polygon is visible, so I do a zoom first. This requires time. Is there a way I can do this that does not require the zoom?
View 3 Replies
View Related
Oct 23, 2013
Since AutoCAD 2013, I'm not able to use tracking when inserting block from tool palette. Example, I want to insert a door at 6 inches from a wall. I click the door from the tool palette, leave a tracking point at the wall corner, move the cursor in the right direction and type 6 follow by enter. The door is insert randomly in the drawing. It was working perfectly in previous release.
Actually I had to insert the door anywhere in the drawing and moving it at the right place and rotate it if required, it is very tedious.
View 1 Replies
View Related