AutoCAD Visual LISP / AutoLISP :: How To (transparently) Get Out Of The View Port Back Into Paper Space

May 3, 2013

I'm trying to limit the activity inside a paper space's view port. Specifically text and dimension objects (our routines) as these layers inside the view port may be frozen.

How do I pragmatically get out of the view port back into paper space?
 
Command: _.PSPACECommand: cvportEnter new value for CVPORT <1>:Command: _.MSPACECommand: cvportEnter new value for CVPORT <2>: 1Cannot set CVPORT to that value.*Invalid*

View 3 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: List Of Coordinates For View Port

Oct 17, 2011

Is it possible to obtain a list of coordinates for view ports (with dxf codes or otherwise) similar to obtaining a list of (assoc 10) for polylines?

I'm aware I can get the center, width and height from the dxf codes, but what about for clipped view ports with irregular shapes?

View 2 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 :: Count Blocks In Paper Space

Dec 9, 2013

I need to count the blocks in paper space automatically. Is there any method or lisp for this.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set User OSnap Settings Transparently

Jul 16, 2013

I have a routine that sets user defined osnaps based on a text file.Here is what is an example of user stored osnap settings -

(setq User_Osnaps (list (list "Alan" "endp,midp,int") (list "John" "cen,ins")))

Here is routine I use to set user osnaps -

(defun CU ()
  (vl-cmdf "-OSNAP" (cdr (assoc (getvar "LOGINNAME") User_Osnaps)))
  (princ)
)

This works great so long as the user is not in the middle of another lisp routine.How can I change this to a transparent command that will work to set osnaps while running another lisp routine?I would like to store it in a toolbar button.

View 9 Replies View Related

AutoCAD LT :: Paper Space View Port Scale

Mar 2, 2012

I have a drawing in model space the i drew to scale of 1'=1' and I went to paper scape to put the drawing in my title block using Viewports. highlighted the viewport and went to properties to give the drawing a scale so it would maximize the Viewport area, on my 22"x34" paper.  but under the standard scale 1/64"=1' is too big and 1/128"=1' is too small.  the simple solution is zoom extents but then in my title block i have to put NTS.  I would like to add to the standard scale or be able to set the customer scale to a whole number. EX. 1:1000 or 1:150, etc. etc.

View 3 Replies View Related

AutoCad :: View Port Freeze In Paper Space?

Sep 29, 2011

We have a problem with the view port freeze. When we feeze a layer in the modelspace of a viewport and save the drawing, on re-opening the drawing we find that the layer that was switched off has been switched back on i.e. the saved mechanism does not work.

We have tried copying a view port that works from another drawing into this drawing by that did not work. We have also compared setttings with the drawing that works and the drawing that does not work. But there was no joy.

We think the problem is with the drawing and need a solution preferably with the settings of the drawing. having to redrawing the whole drawing.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Build Legend In Paper Space

Aug 21, 2006

Routine to build a legend in paper space

I am looking for a routine or app to pull existing MS legend symbols (inserted from the block library) from the drawing and automatically place them in a PS legend. Since I don't have a large screen and sometimes miss a symbol before running a test plot, I wish to automate the process.

I am looking for a way to populate a paper space legend with blocks inserted into the drawing for Land Desktop 2005, 2006 drawings.

I also have to replace non-conforming architectural blocks with my own, then build the legend from all drawings tabbed in the drawing file (possibly all xref drawings as well).

I liked your article on 'Selectively writing drawing blocks to any folder using VBA'. I need to brush up on my VBA 6.0 and learn VB.NET. Perhaps your code can be modified to do the task, and this would be useful to many other designers in a further article.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Link Attribute Paper To Model Space

Jan 24, 2013

Is there a way by which I can link  a paper space block attribute to model space block attribute

In other words

Paper space as a block Title and attribute "QTY"

Model space has a block X and attribute "QTY_MODEL"

Is it possible to edit "QTY" and as a result get automatic update on "QTY_MODEL"

I am not familiar with diesel/macros yet in Acad.

Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Objects In Model And Paper Space

Feb 14, 2013

Is there a quick way to simultaneously delete all objects in a layer if these objects are found across several layout tabs and model space?

At the moment, I'm getting the objects using: (setq a (ssget "X" '((8 . "Revision"))))

This finds all objects in the drawing, but if I just use: (command "_.erase" a "")

to delete them, only the the objects in the current layout or space are getting deleted...

View 2 Replies View Related

AutoCAD 2013 :: Paper Space View Port Oddity

Jun 7, 2013

I have a drawing with some 3d objects that I display with multiple viewports, in paper space, showing different views of the objects.  The viewports themselves are all on one layer that is frozen.  Each viewport with a 3d object is set with Visual style: Hidden & Shade plot: 3D Hidden, to hide all lines that should not display for that view and creating a nice clean image in each viewport. 

Again, viewport layer is frozen so no viewport borders are displayed.  The problem I'm having is that I get random viewport border lines that show up on my plot.  It can be paper or pdf. and could be top in one viewport and side in another, etc.  I have never had this happen before but it seems to be related to hiding 3d line because I have never had a problem when I didn't. 

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Multiple Paper Space Layout Tabs

Nov 25, 2013

Any LISP routine that can create multiple paper space layout tabs and can name them incrementally. I have a template and I wanted to copy tab2 of my layout multiple times and name them incrementally. I have a code shown below that comes close to what I need it to do but it creates a "New Layout" instead of copying the tab I need it to. Please see code below:

(vl-load-com)(defun c:LAYOUT+ (/ *error* prefix i n acDoc oLayouts layoutName) (defun *error* (msg) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat "
** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (and (setq prefix (getstring "
Enter layout name prefix: "))

[Code] ......

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Multiple Paper Space Tabs

Apr 12, 2012

Is there a way to change a specific attribute in a block found over x-amount of papers pace tabs?

At current I can only change one tab at a time.

View 7 Replies View Related

AutoCAD .NET :: Change Initial View Port Size In Paper Space

Jun 27, 2013

When I first draw something on a model space and click the Layout1 tab to see paper space.

The default view port size (the red box) looks like the following.

But I want to maximize the view port size such that (for example) the dotted line to be the defualt view port size in the paper space.

Could I do this by code??

I am currently using ObjectARX 2007 in C#.

View 4 Replies View Related

AutoCAD Civil 3D :: Setting Scale In View Port In Paper Space?

Aug 15, 2012

Setting the scale in a view port in paper space? 2010

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Back Up To Speed On Reactors

Dec 3, 2012

I had programmed Reactors in the past... it's been very long time. Need to renew my understanding?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change This LSP Text Back To ASCII

Dec 10, 2013

I have this old lisp routine that I have been using for quite a while and it works and loads just fine, however I would like to open it to see/edit the code... when I open in Notepad however it opens with wierd symbols... How to get this back into normal text?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieving Current Paper Text Height

Oct 10, 2012

I'm looking for code to retrieve the "Paper Text Height" from the current (active) "Text Style".

View 7 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 :: Scaling DWGs From Imperial To Metric And Back Again?

Oct 24, 2013

I'm looking for a routine that I can choose to scale by 25.4 (Imperial to Metric) or .039370079 (Metric to Imperial).

We just got a CNC Machine that works with metric and people keep asking me to make changes in bothe formats.

I'm using CAD 2014.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Output From MEASUREGEOM Command Back Into VL Program

Oct 17, 2011

Is it possible to get the output from the MEASUREGEOM command back into an VL program?If I use:(setq angle (command "MEASUREGEOM" "a" line1 line2 "x"),

the value of the angle is displayed on the screen but is not passed back into the program and the variable "angle" is not set.Is there a way that I can set this variable?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: SPACE In Folder Or Path Name

Feb 12, 2013

I'm try to write a list to produce a script file!I just want to insert a dwg file in current drawing.back to MS Windows, in case of having [space] in a folder's name, we should use "" marks:

CD "Program Files"; DEL "file 10.txt"; ....

I tried both with and without "" marks but I failed!I pasted part of my code below with result of each case:

(setq TBFile "H:z.autocadA1 A2 A3.dwg")
(write-line "-INSERT" des)
(write-line (strcat "*" TBFile) des); ; *H:z.autocadA1 A2 A3.dwg  <<=should be this
(write-line "0,0" des);;insert point
(write-line "1" des);;xyz scale
(write-line "0" des);;rotation
[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Space From MTEXT

Apr 25, 2013

In my drawing I have lot of MTEXTS having unwanted spaces in between the text strings. 

A lisp to remove space from MTEXT. Here i am attaching sample drawing with MTEXT which is to be modify. Magenta color MTEXT need to modify like yellow color MTEXT.

View 6 Replies View Related

AutoCad 2D :: View Port Use Model Space?

Apr 7, 2012

a Villa Drawing I want give a Bath room Detail, so i want off this villa drawing with out bath room. if i have any modification in this bath room automatically changed the bath room detail drawing in model space not for layout using view port... ,if anypossible in model space, what i choose the part only shown ..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select And Bind All Xrefs In Model Space

Oct 9, 2012

Any code that will select all xrefs in modelspace and bind (insert) them?

the   -xref  bind command requires explicit names and if I use * it will also bind my titleblock xref in paperspace which I want to avoid.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move UCS To Front Of All Entities In Model Space

Jul 9, 2013

I have code that will set and sae a current UCS to the front of an entity, of course, depending on the viewpoint.  This is so, because we need all draft lines in front of 3D solids, such as dimensions, leaders for labels, text entities and so on (the reason for not putting these entities in paper space is another discussion ).

But I'll have on of two problems on numerous occasions:

1. The user forgets all together to run the command.
2. The user will pick the wrong entity that is in the foremost position in that view.

The code I have utilizes the following:

(setq ent (car (entsel)))

(vl-load-com)
(setq obj (vlax-ename->vla-object ent))
(vla-getboundingbox obj 'LowerCorner 'UpperCorner)
(setq LowerC (vlax-safearray->list LowerCorner))
(setq UpperC (vlax-safearray->list UpperCorner))

Then I'll analyze the X, Y and Z of both the lower and upper corners, and set my UCS to whatever is proper.

Is there a "LowerCorner" and an "UpperCorner" for all entities.  I can't see "VSMIN" and VSMAX" working because the elevation of the returned coordinates is always "0,0"

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Color Of Background In Model Space

Jan 2, 2014

Any routine for changing color of AutoCAD background in model space. As for changing background color we have to follow four steps namely as follows:-

1. Execute OP

2. Go to display tab

3. Go to color tab

4. Change color

A tool that directly calls the model color shall be highly beneficial.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Model Space To Display As Plot Style?

Jun 28, 2012

Is there a way to get model space to "display plot styles" through a lisp routine or a script?

i'm currently setting up a whole bunch of custom tool palettes for the company I work for and instead of the icons displaying in their actual colour (at the moment they're green, which doesn't show up very well on the light grey background), I'd rather they show in the plotstyle assigned to the individual dwg's.

call up the page setup manager (while in model space) and click modify, you can then check the radio button to "display plot styles" in the top-right corner. But when you have around 100 - 200 blocks to change, that process can be rather time consuming and cumbersome!

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Program To Evenly Space Objects Across Given Distance

Dec 28, 2013

I would like to write some sort of AutoLISP program to evenly space objects across a given distance.  I have attached a .pdf file showing what exactly I mean.

I would like the program to enable me to either enter or measure (via the selection of two points) the "z" distance, to enter or measure the "y" distance, and to enter the number of objects, "n".  I would then like the program to evenly space "n" objects across the "z" distance.

A program like this is, I have to be honest and say, way beyond my current capabilities.

Perhaps some initial guidance to get me going? 

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Check Object Type Of All Objects In Model Space

Feb 25, 2013

Without opening the drawing...

How can I iterate through and check the object type of all objects in model space?  And... then delete them if they are certain types... like lines, circles, polylines, text, mtext, etc?

View 2 Replies View Related

AutoCAD 2013 :: Rotating Objects On Model Space In View Port

Jan 23, 2013

How do i rotate objects, plans...etc on model space in a view port.

View 9 Replies View Related







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