AutoCAD Visual LISP / AutoLISP :: Copying Layout Tab And Xref New Title Block

Apr 30, 2013

I need a routine that will duplicate the current sheet's Layout tab and content to the next tab, set it current, delete the titleblock (by name) on the new tab and reference in a differently named titleblock, 1:1, 0,0 onto the new Layout tab. I'll be running this in a batch script.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Title Block Attribute

Jun 24, 2013

I can't find my notes on how I fixed it. When we insert our title block, it automatically inserts the drawing number. For one user, it doesn't work. The title block inserts, but it won't put in the drawing number. I seem to remember I need to change a setting or something to get it to work, but I can't remember what it is.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Xref In Selected Layout And Zoom To Match View?

May 28, 2013

I have used Autocad since 1991, and my current job required me to use Microstation. One feature I liked from Microstaiton is the ability to select and open an external DGN reference, and then match the view of the parent DGN. In AutoCAD, you can also select and open an xref, but the DWG opens to the previous saved view, and not to the desired view that matches the layout.

My thought was to experienting with lisp or scipt and export the "Viewctr", "Viewtwist" and "Viewsize" variables to a text file, then importing the text file and using the "Viewtwist" as my "SNAPANG" value, then "Viewctr" as my "ZOOM, CENTER" value, and finally the "Viewsize" as the "Enter magnification or height:" value.

But, alas, have no time, and not quite the knowledge to duplicate MicroStation's open-xref-and-zoom-to-view feature.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Boundary To Title Block?

Jan 3, 2012

1. I want to all selected profiles or blocks set to one object, than continue to select second object,(see attached drawing file). How to write the "ssget" lisp.

2. Command "line" ask me specify next point.

3. Found object boundary prompt me to "select oblect", when i selected profile, with the error: bad argument type: consp.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Renaming Layouts According To Title Block

Mar 20, 2013

I have a specific problem with renaming layouts. I found some similar lisps, but I just could not make them work. 

In every layout I have following attributes. 

PROJECT: 306
PHASE: RD
OBJECT: A0101
PART: EL
DRAWING: 611
ZOOM: X
REVISION: 01

I need to rename every each of layout using those attributes. Layout's name should look like that: "306_rd_A0101_el_611_x_01" . "rd", "el" and "x" must be written using lowercase. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Linking File Names Into Title Block But Only Using Some Of The Name?

Aug 18, 2011

We are using a title block and it has an attribute field that links to the file name. Now one of our projects is adding the revision to the CAD file name, but it messes up our drawing sheets.

i.e. It was fine when the CAD file name was 111-A222-ZZ-X-123456.dwg and this would display the complete 111-A222-ZZ-X-123456 in the drawing title.

Now we need to do this, the CAD file name, 111-A222-ZZ-X-123456-001002-A1.dwg and we still need to just show 111-A222-ZZ-X-123456 in the title block, striping away the 001002-A1.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automating Changes To Title Block Date Attribute?

Jul 18, 2011

I'm using Autocrat 2004.

I have a attributed titleblock. Sometime in the future I will need to change the date attribute to another value, i.e.. 7-11 to 9-11.

I can't place a text string in the title block because this title block is used for multiple drawings and the date will be different for different sets. I can't have numerous title blocks because of the client's requirements.

Question:

Is there a way to write a script to open a drawing, look for the specific attribute, change the date value, save and close the drawing - across multiple sheets? Would a lisp routine called by the script be able to do this? Or a script file called by the original script file? CAn you even use a script file in this manner?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Rename Using Attribute From Title Block

Oct 22, 2009

I am working on a large project where a 3rd Party firm has turned over 100s of drawings that we need to get into our system. The problem is that they did not name their physical files properly. We have a particular numbering system for our drawings, the engineering firm did fill in our attributed title block properly and used our numbering system correctly within the drawing. However, their physical file name follows their format. We need to have the physical file name match the information in the title block to get into our system.

Is there a way to "Batch Rename" these files by reaching into the title block and then renaming the physical file to match the attribute?

I have to be honest, I may use AutoCAD 50 to 60 hours per week, but I am no programmer! I am just the go-to person here for AutoCAD whom is stuck trying to come up with a efficient solution for the project team whose engineering firm could not follow our procedures! I was hoping some sort of batch routine could take care of this problem for us instead of us having to individually rename each physical file one by one.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Title Block Attribute Text

May 9, 2013

How to export title block attribute text .. in a order from different layout .? file ext .xls or .txt  i got a tool named Autocad Automation tool but it not work very well autocad have data extraction - its also came all text .. and not in order .. can we develop the any lisp for that ?.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Entname Of Last Block Added PER LAYOUT?

Dec 5, 2013

Is it even possible to get the entity name of the last block added to a layout? I need to find the entity name of the last block added to each of three layouts. 

Previously I was using entlast but obviously that will not descriminate per layout.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Block In A Specific Layout Using Function

Jan 28, 2012

I would like to insert a block in a specific layout (eg. "LAYOUT13") using the function vla-insertblock

I have already searched the web and this newsgroup but have not found the solution.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Display Paper Size Of A Layout In Block

Dec 20, 2011

I'm trying to display the papersize of a layout in a block. So far I've looked into diesel and field expressions.

With field expressions I can get the name of the papersize to display that's too long(OVERSIZE: ISO A1), I need only the last two letters.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Xref Layer With Xref Name?

Jul 31, 2009

Is it possible to run a lisp which can extract all the xref names, make a layer with that name and then change the xref on the layer? I have got a similar routine from earlier posts but it doesn't work if any xrefs inserted in paper space (works fine on model space). could change this routine allowing to change the layer of xref in paper space too.

(defun dxf (i a) (cdr (assoc i a)))
(defun c:lxr ( )
(setq ss (ssget "x" '((0 . "INSERT"))))

[Code].....

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Xref Reactor Object ID To Xref Name

Oct 2, 2012

I am using (trying to anyway) a :VLR-xrefSubcommandReloadItem reactor.  My only question is how to get the xref/block name from the 'reactor callback data' Object ID.

I am ultimately trying to pass it to (vla-get-xrefdatabase ....), but I cannot figure out how to turn the second parameter from the reactor callback data into something I can use - for example the second parameter returned may be "65" or some other number. 

Civil 3D 2011
Windows 7 x64

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Auto Update Of XY Coord In Model Space Onto Paper Space (Layout Tab) Block

Nov 5, 2013

I've tried doing a block that automatically updates the X and Y coordinates from its moveable leader. I can get it to work in model space or paper space. But my problem is I want it to work in PS, but update with the MS coordinates through the viewport.

I can get it to update, by LISP, by picking a point and passing the points to the blocks attributes. At the moment I have a LISP when actioned it locks the viewports, activates the viewport, and asks you to select a point. Once selected it de-activates the viewport (going back into layout tab) then asks which block you want to update. Where you now select the block and it updates the coordinates.  I.e. manually pick the point in MS, switch to PS and then manually pick the block. Then I have to manually modify the leader to the correct location.

I'm hoping that I can (In PS) move the end of the leader to snap to a position in MS and the coord updates to reflect the correct MS coordinates. I'm thinking that maybe this can't be done automatically and that I maybe can move the leader but I'm not sure how I can do it without running a LISP to update the block?

I'd be happy moving the leader then just running a single command and the leader coordinates updating without having to select the points and the block again.
  
I've attached the block showing the auto update of the attributes (fields).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Mleader With Xref Name?

Jan 27, 2012

I am looking for some mleader customization.Basically looking for a mleader that will add an objects name(in my case an xref or block) in the text. Attached is a picture of our current process... nothing special. basically instead of typing in text we use the insert field. In the field dialog that opens we select "object" under Field names, then under object the type button is pressed to select object(in my case and xref or block) then under property the "Name" option is chosen. This will insert the xref name in the multileader. This is not terribly hard but am curious if I can automate and save some steps.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Xref Insert To 0,0,0

May 10, 2012

I can't seem to find the SYSVAR that controls insert to 0,0,0 instead of pick on screen..

Quad Core 2.3GHz Intel, 64-Bit, Win 7
16GB Ram, 2GB Graphics Card
256GB SSD

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing XREF Layers In DWG

Oct 1, 2012

How to edit this string so that it would change ONLY XREF layers in a dwg. to color 3 bylayer, and leave all of my additional layers in the current dwg. as is.

^C^Cchprop;(ssget"x");;color;bylayer;;-layer;color;3

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Alert When Xref Is Moved?

Jun 29, 2013

I'm new to the programming thing, and this one has me stumped.  We have a problem with people accidently dragging xrefs.  The simple solution would be to put all of the xrefs on a locked layer, but I was vetoed on this suggestion.  I've been trying to figure out if I can write a lisp that will do one of the following: Give an alert if an xref is moved.Not allow an xref to be moved.Tell the user when they open a drawing that an xref is not at 0,0,0 insertion point.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Renaming Xref Using Code

Jun 18, 2013

This lsp was passed on to me from a colleague but he doesn't know where he got it. It does a useful procedure of placing each xref, residing in the drawing, to a unique layer. The layer name is derived from the xref name. I would like to edit this to take only part of the xref name. This system I work with requires all files to have the job number as a prefix eg LE1399901_Contours.dwg, so the xref name would be LE1299901_Contours by default. I want to remove the first 10 characters to be left with "X_Xref-Contours" layer name using this code.

(defun dxf (i a) (cdr (assoc i a)))
(defun c:lxr ( / ss cnt xrs en ed bn xp xbn )
(setq ss (ssget "x" '((0 . "INSERT"))))
(setq cnt 0)
[code]........   

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: XREF Rename / Repath

Nov 25, 2012

what i would like to do is rename (externally) and repath about 4-8 xrefs in a drawing set of about 100 drawings. 

you may ask why? it is because we are trying to establish a template set of drawings for a civil design office. and when we start a new project, copy over the drawings to the relevant project folder, change the project number, run the script across the drawings and go from there. I've also tried this using the reference manager, but it doesn't work when you change the name of the xrefs (loses association)

basically i know if i could use a lisp i would run it using autoscript or something equal. All i need is to figure out the code to change the project number in the xref

for example

current - "xxxx-PN009999-aaa-00-survey.dwg"
change to - "xxxx-PN001234-aaa-00-survey.dwg"

from my research so far, the easiest way is to make a lisp with the following

-rename
b
xxxx-PN009999-aaa-00-survey
xxxx-PN001234-aaa-00-survey
-xref
p
xxxx-PN001234-aaa-00-survey
c:acadcivildummyfolderxref

If this is the correct code, do i have to rename the CAD xref files in explorer first?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Freeze All Xref Layers?

Apr 24, 2013

I have the following code that works, most of the time.  Actually, it works or completes itself all the time, but there is no "all encompassing" measures incorporated.

All of the reference entities, believe it or not, are on layer "0".  There are also some consistent layers, that you can see in the code below.  However, a user may create or even remove any layer in the reference drawing.  Therefore in my current drawing, I may have layers that are not frozen in the xref.

Like i said, the following code works, but not all encompassing.

(setq filename "7102-002-950 UC10-03")
(setq FreezePRD (strcat filename "|_PRD"))
(setq FreezeSLD (strcat filename "|_SLD"))
(setq FreezeBORDER (strcat filename "|0_BORDER"))

[Code] ........

I guess what I'm looking for is to freeze all layers that begin with "7102-002-950 UC10-03|".

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Lock Layout Tab

May 9, 2012

How to Lock Layout Tab.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set PDF Metadata (Title / Author / Subject)

May 6, 2013

I have a programming background but have never used AutoCad nor AutoLISP. I'm walking into a situation where we had a resident AutoLISP expert that has written a routine to output Autocad to PDF using the built-in PDF. I'm told the autolisp goes through a bunch of logic to create folder path, file, etc of the output PDF. I don't have access to the code.

What we need is for that routine to also set the metadata on the output PDF (Title, Author, Subject, Keywords), At the minimum we need to set the PDF Properties Title = to filename and it needs to be done at the time it is generated from Autocad to PDF.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Xref Layer Color

Aug 14, 2009

I'm looking for a lisp that will change all the layer colors of selected xref by clicking the xref and select color from the color table palette. I have a routine that would change the layer color of a selected entity other than xref.

;;Changes selected object layer to a true color
;;of chose from a dialog
box
(defun c:cvc (/ ent ent_data rgb str objlay)
(setq ent
(entsel)
)

[code]....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Field Object Attribute In Xref?

Oct 19, 2011

Is there way get field object att in xref ?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bind Xref Via ObjectDBX Without Opening

Feb 11, 2013

is it possible to bind an an xref via ObjectDBX without opening the drawing?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Nested Xref To Regular

Nov 7, 2013

Any routine or way to convert a nested xref to a regular xref?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selected Object Is In XRef To Highlight

Aug 15, 2013

I think there is a function that will cause the selected object that is in the XRef to highlight.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing Nested Block From Main Block?

Oct 3, 2013

I get an AutoCAD drawing from my conveyor manufacturer who have buried a block (tagname) in all of their conveyor blocks.

The only way to remove them is to manually use BEDIT and erase the tagname block.

Is there a way through Autolisp to search all blocks in a drawings and if the tagname block is part of the definition of the conveyor block, erase the tagname block or redefine the conveyor block without the tagname block.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieving Block Name Of Anonymous Block

Mar 8, 2013

When dynamic blocks are inserted they're assigned an anonymous block name.  I'd like to be able to retrieve the name of the parent block after selecting the block on screen using AutoLisp.

Need a bit of code that handles this?

View 3 Replies View Related







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