AutoCad :: LSP To Replace Points In A Drawing Into Block

Dec 15, 2011

I'm using an LSP to replace points in a drawing into a block. I've had this working previously, no problems. However, having spent some time creating new blocks when running the LSP the points are being replaced at a different location in the drawing - rendering the whole process useless.

I get the impression this is caused by the block itself rather than the LSP. What am I doing wrong that would cause this effect?

View 1 Replies


ADVERTISEMENT

AutoCAD Inventor :: VBA Replace Title Block Definitions In Drawing From Template File

May 7, 2013

I have some code to replace the current title block with a title block from a template file. I just don't like how it adds a new title block definition named "copy of titleblock". I'd like to delete or replace the current title block definition so only the newly added one is listed.

 Sub test() Dim odrawdoc As DrawingDocument Set odrawdoc = ThisApplication.ActiveDocument If (odrawdoc.DocumentType <> kDrawingDocumentObject) Then Exit Sub Dim oTemplate As DrawingDocument Dim oSourceTitleBlockDef As TitleBlockDefinition Dim oNewTitleBlockDef As TitleBlockDefinition Dim oSheet As Sheet Set oTemplate = ThisApplication.Documents.Open(ThisApplication.FileOptions.TemplatesPath & "template.idw", False) Set oSourceTitleBlockDef = oTemplate.ActiveSheet.TitleBlock.Definition Set oNewTitleBlockDef = oSourceTitleBlockDef.CopyTo(odrawdoc) ' Iterate through the sheets. For Each oSheet In odrawdoc.Sheets oSheet.Activate oSheet.TitleBlock.Delete Call oSheet.AddTitleBlock(oNewTitleBlockDef) Next oTemplate.CloseEnd Sub

 I'm just being picky at this point, but I don't want a buildup of title block definitions. We reuse drawings all the time which is why a simple method of updating a title block would be nice. I can just imagine in some years time after a title block update or two there are 20 "copy of copy of copy of .................. titleblock" listed in a drawing file.

View 8 Replies View Related

AutoCad :: Block With Coordinates - Read Points In Drawing?

May 13, 2011

I'm trying to make a standard block which will automatically read the co-ordinates! i have started making it trying to use fields, but when inserting the block into the drawing it stays at x=0, y=0, which is the point in the block. how do i get it to read the point in the drawing, and also how would i always get it to read the world ucs.

i have attached the block i've started, haven't added any dynamics yet as i'm just testing it.

View 1 Replies View Related

AutoCad :: Replace Block Moves Symbol In Block Location?

Apr 12, 2012

I have blocks with several attribute tags and layers. The problem I am having is somehow when I go to replace the block with a different one the attribute tags stay in the right spot but the symbol acts like it looses its coordinates and comes in a different spot. I cant seem to fix it. When I zoom all it block editor it zooms like I have a symbol way off the mark, but I don't.

View 2 Replies View Related

AutoCad :: Replace Old Block With New Block

Jan 7, 2014

I'm having trouble using the blockreplace' command. Every time I try it tells me the block name has invalid characters. The attached files is an example of the issue. I'm trying to replace the old block with the new block.

View 9 Replies View Related

AutoCAD Civil 3D :: Inserting A Block Deletes Points With Point Style With Same Block

Oct 16, 2013

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.

View 7 Replies View Related

AutoCad :: Replace One Block With Another?

Mar 24, 2008

I'm working in ACAD 2008 and have a drawing with multiple blocks (block 'a') that need to be replaced with block 'b'. Is there a command similar to edit/find that I can use to replace the block? I don't want to redefine my block and want to only select certain block 'a' to be replaced, not all block 'a'...

View 9 Replies View Related

AutoCad :: Replace Block Command?

Sep 6, 2012

I remember on a pc i was using once upon a time, AutoCAD had a command called replace block. the shortcut was 'RB' and you could replace a block with another one very easily.

View 2 Replies View Related

Illustrator Scripting :: Replace GPS Points With A Symbol

Dec 19, 2011

So I am trying to replace gps points with a symbol I have created. I have found blogs referencing a script that can replace selected items with symbols saved in the symbols panel, but I can't seem to find the actual script! Where I can find JET_ReplaceWithSymbol.jsx or any other script that can do the same function.

View 21 Replies View Related

AutoCAD Inventor :: Replace Title Block C#

Oct 2, 2013

I am trying to replace the title block of the first sheet of the active drawing via C#. I currently am receiving the following error on the last line of The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).

Why the code below is throwing this error? I have tried multiple variations of the code below to no avail and I'm sure this is something minor that I am overlooking. The title block definition under Drawing Resources is replaced with no errors, the title block on Sheet 1 is deleted just fine, but I can't seem to add a Title Block back in!

How Documents are defined:

Inventor._DrawingDocument oDoc = getDoc();Inventor.DrawingDocument sourceDoc =(Drawing Document) instance.Documents. OpenWith Options(sPath, options, false); Find, copy, replace: TitleBlockDefinition tBlock = sourceDoc.TitleBlockDefinitions[blockList.SelectedItem.ToString()]; TitleBlockDefinition newBlock = tBlock.CopyTo(oDoc, true); oDoc.Sheets[1].TitleBlock.Delete(); oDoc.Sheets[1].AddTitleBlock(newBlock);

View 1 Replies View Related

AutoCAD 2010 :: Block Replace Rotation

Jul 26, 2012

I am using Express Tools Block Replace how do I keep the blocking being replace from rotating to the orientation of the block using for replacement? 

View 2 Replies View Related

AutoCAD .NET :: Replace Or Redefine Block Record?

Aug 6, 2012

'How I can replace or redefine block record?'.

I tried the following:

1. Get all the block references

2. Clone it

3. Save to new DateBase

4. Erase old Block REferences and Block Record

5. Copy block references from new DataBase

But it doesn't work.

View 3 Replies View Related

AutoCad :: Replace / Redefine Block Removing Attributes

Aug 27, 2007

I'm working with some "dirty" blocks that contain several attributes. I've cleaned the blocks up by wblocking, cleaning, & purging the newly created block. I also removed any attributes within the file, including those within blocks within the file. I then renamed the file and inserted it into the drawing, and did a replace block with another through express tools. The problem that I have is the blocks are replaced with the clean version, yet the attributes remain. Is there a solution to this. I do not want any attributes to remain and the only way I know how to fix it is to replace them one at a time.

Also, I'm using AutoCAD 2004.

View 9 Replies View Related

AutoCAD 2013 :: Block Replace In 2014 Doesn't Work

Oct 1, 2013

When using the block editor to rename an existing block to clean that instance of the block name out of the file, the block replace command from express tools does not work.

I select a block enter block editor save block as (new Name) save and exit block editor.Insert new block into the drawing.Express tab on the ribbon select Replace Block select block A to be replaced by Block B purge out instance of block A after complete. It reports 0 blocks replaced

attached is a file with 2 blocks called Drain and Drain X each have the same visibility states I want to replace Drain with Drain X to purge out Drain from my file.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Nested Block

Aug 7, 2012

I have a dynamic block that has a nested temporary block inside it. What I am wanting to do is replace the temporary block with the permanent block. I have tried several different variation of coding but I cannot seem to get this bad boy to work. have used:

(vla-put-name (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))) "tempBlockName") "newBlockName")

this gives me a duplicate names error. 

View 1 Replies View Related

AutoCAD 2010 :: Block Replace Lisp For Multiple DWGs

Mar 8, 2012

I am looking for a lisp that can run a block replace on multiple drawings.

Something similar the the express tools block replace I suppose, just able to process many drawings at once.

I'm trying to change attributed approval stamps to attributed inter squad stamps and don't want to have to go through all 150 drawings and do it myself.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modifying A Replace Block Script

Nov 26, 2012

Is there a way to modify this script so you don't have to manually choose the blocks. Instead have it find all block names starting with "Supply Diffuser 24x24" and replace them with a block in the drawing named V01.
 
(defun C:CHANGEBLOCKS(/ printDebug ssAll ssAllTotal ss ssTotal ssCount ssCount2 ssTotal ssMainBlock ssMainBlock entListMainBlock ssBlocks entListBlock entListBlock2 entElementNewBlock entElementOldBlock entElementOldBlock2 oldBlockName) ;PROGRAM CHANGES MULTIPLE BLOCKS ;WRITTEN BY --- RAUL BENITEZ ;Command reference ;subst - returns a list with a new item substituted for every occurrence of an old item ;quote (or ') - easy way to make the string into a list. ;cdr - returns a list containing all but the first element of
[code].......

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Block On Different Layers With Different Blocks

Jun 20, 2012

I was able to write a LISP that replaced each node with a block of my choice.However, now I need to find a way now to replace the blocks with different blocks.Each point shares the exact same block called "PILE". Different blocks are on different layers and have 11 different colors. I'd like to replace blocks on layer 1 with a block called "1" and blocks on layer 2 with a block called "2" and so on.I was hoping there would be an easy way to do this in LISP, but I've been unable to get any of my scripts to work.

I've attached a link that visualize what my drawing is currently looking like: [URL] ......

View 2 Replies View Related

AutoCAD 2010 :: Lisp To Replace Text With Block / Or To Draw Circles Around Mtext

Mar 23, 2012

I need to lay one of our existing blocks ontop of every power outlet on a floorplan (the power outlets are currently shown as a simple shape (eg. either a rectangle, triangle or circle) with text next to it.

There are hundreds of power outlets, so if there is a lisp routine for replacing any part of the power outlet with the block, eg. replacing text/mtext with a block or replacing a pline with a block.

I have found a very successful lisp routine for replacing circles with blocks, but this obviously only works on the power outlets that are shown as circles. So a simpler way of looking at it could be a lisp for drawing a circle around mtext/text then I could simply use the circle to block lisp to place the blocks.

View 5 Replies View Related

AutoCAD Inventor :: Replace Styles In Drawing?

Aug 24, 2012

I have some styles I will like to replace in some drawings but how? I cant find any function to do this.

Dim oIDWStyles As Inventor.DrawingStylesManager
 Set oIDWStyles = oDrawDoc.StylesManager
 Dim oldstyle As style
 Dim Newstyle As style
   For Each oldstyle In oIDWStyles.Styles
     If oldstyle.Name = "Old style" Then

[code].....

View 5 Replies View Related

AutoCAD 2010 :: Possible To Replace Text In Drawing?

Aug 2, 2012

I have a drawing with numerous text fields that I'd like to replace.  For example, there are 30 different text fields showing a dimension of 19.298".  I need to replace all of them so that they show 19.125" instead.  Is there a quick way to swap out the text without having to do it one field at a time?  Is there something that would allow me to do it globally rather than individually?

View 5 Replies View Related

AutoCad 2D :: Find And Replace Tab Names In One Drawing File?

Dec 19, 2013

is there a way of find and replace tab names in one drawing file? one file with six tabs named 001 rev A, 002 rev A etc. i would like to change all the "rev A" to "rev 0" with out going into each tab seperatly and changing them.

View 2 Replies View Related

AutoCAD Inventor :: Can't Replace File In Placed View In Drawing

Aug 21, 2013

I made a complex drawing.

Now i changed the part file just a little, the placement of a few holes, and saved it to a new name.

I need both versions.

In the Design Assistant i copied the drawing file to a new name.

Now i want, in the design assistant, to replace the file the drawing refferences, but can't, the replace option is greyed.

I understand there might be larger changes, is that the reason?

View 4 Replies View Related

AutoCad :: Replace All Existing Elevations In Drawing With Same Contents

Mar 3, 2011

A way to substitute the contents of a text throughout the drawing easily? What I want to do is substitute all existing elevations in the drawing with the same contents, but enclosed in parentheses, so that: xxx.xx becomes (xxx.xx)

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine Required To Replace / Place Block On Each Closed Polyline?

Mar 26, 2012

Does any Lisp routine available to batch replace all the closed polylines with an existing block?

View 9 Replies View Related

AutoCad :: How To Replace Logo Without Losing Formatting Of Drawing Template

Mar 18, 2013

I have drawing template files created by a former employee that need to have the old company logo removed and replaced in the title block. If I double click on the title block, all information displays, except the graphic for the logo. If I explode it, I lose all the .dwt formatting. How can I replace the logo without losing the formatting of the rest of the drawing template?

View 6 Replies View Related

AutoCAD Dynamic Blocks :: Actions And Parameter Grips Obscure Drawing-block In Block Editor

Mar 28, 2011

My drawing- block is a little bit complicated, it contains few actions and parameters and everytime i open block editor to add, or to modify some action I can't see my drawing because actions grips and parameters grips obscure my drawing. I tried to refresh layout but it doesn't work.

please take a look on attached jpg.

View 1 Replies View Related

AutoCAD .NET :: Clone Block With Points

Jul 21, 2013

I have a object which im cloning and moving along a path.I am finding the GeometricExtentsBestFit points of the block and plotting in the drawing.I want to clone the object with these points.

Dim bref As BlockReference = actran.GetObject(idsBox(0), OpenMode.ForWrite).
Dim BlockCloneNew As BlockReference = bref.Clone()
Dim bestFit AsExtents3d = bref.GeometryExtentsBestFit
Dim bestfitMin As Point3d = bestFit.MinPoint
Dim bestfitMax1 As Point3d = bestFit1.MaxPoint 

View 7 Replies View Related

AutoCAD .NET :: Insert Block On Multiple Selected Points

Apr 20, 2012

I am trying to put something together that will allow a user to select objects in AutoCAD and then place a block at all the selected points. 

Below I have pasted the code that I have so far, but have not been able to test this to see what happens because the Dim ofd part is giving me an error that I have not been able to figure out. 

The error that I am getting says that :

Argument not specified for parameter "flags" of "Public Sub New(title As String, defaultName As String, extension As String, dialogName As String, flags As Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags)

Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
[code]......

View 9 Replies View Related

AutoCAD 2010 :: Align Block With 2 Points On Line?

Sep 4, 2012

I would like to make a block with 2 points and I would like them to follow a line with those 2 points..

Same as you can use the measure command to put blocks on a line with a pitch distance I would like to do the same but the block schould snap with 2 points on the line.

View 9 Replies View Related

AutoCAD 2013 :: Insert A Block Using Selection Of Points

May 20, 2013

I'd like to insert a block into a big selection of points. Any way or have I to look at customization routines.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved