I would like to detect view change (especially when orbiting the view around) to automatically reposition table-like(block) entity such that the user can always see the face of the entity.
I figured out that there is viewChanged event in AcEditorReactor, but it doesn't seem like it is visible in .NET.
How to change the Scale Uniformly property in dynamic blocks accross hundreds of drawings using either/or scripts, lisp, vba or anything else that might do the job.
I just need to open the drawing and select the block (one block per drawing) then edit the scale uniformly property within the block, save then close the drawing and move onto the next drawing.
a customer has a title block with a revision table ( standard vault revision table) add on top of it.
If you change the sheet size the revision table remains his position.
If found the way to reposition the table with a ilogic rule.:
'point afstand in cm PointX=(ActiveSheet.Width/10)-13 PointY=5.5 'punt vanaf rechtonder gemeten in cm
[Code]....
This is working perfectly. But now the challange how to trigger this rule to run if you change the sheet size?
if tried:
trigger=Activesheet.size
or
to create a userparameter and added this line in my rule : Size=ActiveSheet.size, normaly is you change parameters it triggers the rule to rule. but both way didn't work.
Can event triggers from the API be used? Do i need the "Onchange" event? Any example for a ilogic rule?
If i zoom in image so it's bigger than "Fit on Screen" then if open/create or go to other opened image and return to 'zoomed' one, PS reposition area i see to right upper corner.
Planning to overrule some of sub entities in a block. Let's make it simple . All lines and attributes in block should be circles and original block should not be seen. I came up with below code.
The code reacts differently if I remove
MyBase.WorldDraw(drawable, Wd)
and my goal is not to show the real block. Just showing whatever is overruled.
Public Class toverrule Inherits Autodesk.AutoCAD.GraphicsInterface.DrawableOverrule Public Overrides Function WorldDraw(ByVal drawable As Autodesk.AutoCAD.GraphicsInterface.Drawable, ByVal Wd As Autodesk.AutoCAD.GraphicsInterface.WorldDraw) As Boolean Dim myBlock As BlockReference = CType(drawable, BlockReference) If Not myBlock.Database Is Nothing Then [code].......
A circle on layer CIR having a color of red... A defined attribute on layer ATTR having a color of white... The insertion point is the center of the circle...
Is it possible to change the circle to blue on one instance of the block without affecting the same change to other identical blocks in the drawing? Example:
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
I need ot append events when the dimstyle is change using the AutoCAD dimstyle popup list, but don't know which reactoer to use. I tried with Comman begin and end, and Sysvawill change and changed, but they don't detect the dimstyle changes.
For AutoCAD 2006, I have an entity that I am changing properties of, but I cannot figure out how to set the colormethod to "By Layer." I am sure that I am missing something, but I am at my wit's end.
I am using ACADE 2008 and VB.NET. I have a multitude of drawings that I am doing the same three and four operations on and would like to write VB.NET program to do it. I can get my selections set just fine, but my first problem is figuring out how to change all drawing entities color and linetype to "ByLayer". So far I have not gotten past changing just the color value. I have tried multiple variations on the following line without success:
I have a Lisp that I have been working on with some folks in the office, and i feel like i am close, but i am not getting the cigar. The idea would be to have the lisp allow the user to select a nested x-ref entity, and change the color and linetype of the selected layer, similar to the old "LAP" command (I know it is a dinosaur, but I still miss it). I seem to be doing swimmingly, code I have quasi-plagiarized. It seems to crap out where i try to pass the selected linetype back to the layer. I get the nastygram "Command: ; error: no function definition: GETLINETYPE" right after selecting the linetype from the dialog.
Code below...
x(defun c:CX (/ Sel EntList DataList cnt Num ClrNum EntData) (if (setq Sel (nentsel " Select object to change layers color and linetype: ")) (progn
I have a number of areas numbered 1,2,3......etc but I need to change the text to the following where only the last number that is underlined is to increase sequentially.
P23/L2/1
Could Tcount be used or is there a modified version available?
If not is there a quick way to automatically place a number block onto a drawing with a click and then for every other click sequentially increases the last number.
see attached block. I would like the current date be present, instead of typing in the date for this block. When I insert "IFC" block, I would like todays date to be inserted automatically. I guess I am asking if you can make smart blocks in autocad 2009? Let me know if I'm not asking this question correctly.
When I create a model space view; then drag it on the sheet; shouldn't they be linked? I mean if I go into the View drawing, move the drawing in question, then update the model space view, shouldn't that update the sheet view automatically? Theoretically speaking of course; we are talking AutoCad.
I've noticed in inv.pro.2012 that after properly locking the link with representation view in idw, saving the files, and then after replacing a part in iam, some of my links in idw views are again unlocked (and I hope you know what that means for the drawing itself). I never had it in inv.pro.2010 and earlier versions.
I know it can be done but have had little luck finding how. I need to Convert GIS features to an engineering friendly cad file and I'm stumped at the point of assigning blocks to the points.
Also another issue is that I would often need to assign those blocks based on field values. Noob questions I know but it's my one critical step I've not sorted out.
I have an assembly with a subassembly in it. The subassemblies bom structure is set on Normal so that the subassembly number shows on the main assembly BOM and not the individual parts.
However when I place the parts list on the .idw of the main menu it keeps on selecting the parts structure for the BOM, I need it to select the structured view. How do I get it to select the structured view on the BOM so that the BOM does not show the individual parts of the subassembly?
I have made sure that the parts view on the BOM in the source assembly is disabled.
I have created a dynamic block with a stretch, flip and rotate. Everything works great in its file. When I insert it in another file, the grips move but the block does not change.
How I can modify this code to create a block, ask for a new name for the block, then add the attributes listed inside the code below to the new created block. The lisp does a wonderful job - however, it only works if you already have a block created. We are in the process of drawing components and making blocks one by one, so it makes sense to add the attributes automatically when the block is created. We currently have over 500 components to create as a block and set the attributes to each one by one.
Also I would like to know, If Fields can be used inside the lisp routine. That way we can always have access to the attributes from outside the block and change values for all the blocks at once.
(defun c:addattribs ( / blk def ) (while (not (or (= "" (setq blk (getstring t " Name of block to update: "))) (tblsearch "BLOCK" blk) ) ) (princ (strcat " Block "" blk "" not found.")) ) (if (/= "" blk) (progn (setq def (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) blk)) (vla-addattribute def (getvar 'textsize) acattributemodelockposition "New Attribute 1" (vlax-3D-point 0 0) "NEW_TAG1" "New Value 1" ) (vla-addattribute def (getvar 'textsize) acattributemodelockposition "New Attribute 2" (vlax-3D-point 0 (- (* 1.5 (getvar 'textsize)))) "NEW_TAG2" "New Value 2" ) (command "_.attsync" "_N" blk) ) ) (princ))(vl-load-com) (princ)
I have just upgraded to 2013, and there is one "feature" I find kind of distracting. When working in a part, I create a new sketch. When I extrude that sketch, Inventor automatically switches me to an Iso view. I don't want that. I would prefer to stay in the view that I established.
I am working on a lisp routine that automatically inserts a parameter in a block and then ads a stretch command to it. But the problem is that for the stretch command u need to select the drawn parameter. So my plan was to get the name of this parameter (car (entsel)) and feet it to my lisp program. But when i do that it doesn't work because autocad demands a parameter.
I currently use Mep 2012 although my question I believe is general in nature. As a sheet metal contractor I do drawings that have many different entities at various elevations. Many times I use change propeties to match the propeties of on entity like a linetype to change another. What I really need to do is have the ability to use a similiar button and match or change the "Z" elevation of a specific entity just like I do for linetype, color etc.
I have a drawing that draws from a .dxf template, this drawing is for a piece that travels along on a basket. Often times there's more than one "traveler" so in order for me to differentiate each traveler I added an "XX of XX" on the template, the XX's referring to the traveler number and the total travelers (i.e. 01 of 03).
Before I print out the sheet I have to replace the XX's with the real numbers then I can print it, so if theres 45 travelers i have manually click each time and then type the number in, 01 of 45, 02 of 45, 03 of 45... 45 of 45. Is there a way I can get this process automated like where I'm asked how many sheets I need then it automatically populates the sheet?
i have tons of column tags but wants to change the distance between column size and the circle and make the font smaller. I can do this individually but can't do one by one..... is there any way i can adjust all by one command or one magic touch?