AutoCAD .NET :: Overrule Specific Sub Entity In Block And Not Showing The Base
Aug 11, 2012
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].......
Simple example, when overrule Line entity to draw three entities Line, Text, Circle when selecting overruled Line is it possible to identify what object have been selected (in this example it could be Line, Text, Circle).
I have been using copy paste with base point on block from drawing to drawing but sometimes the block insert but it is not showing. I go to insert block is there but does not show in the drawing. Then tried to purge it and it does not let me because it is in the drawing but I can find it any where. Then I tried to do the insert block look for the block and inserted as a block and the same result.
I've had a simple lisp I've been using for years that suddenly disappeared. It required that you identify a block name, tag name, and the value that you want the tag to be. All of this is performed via command line, so it is scriptable. Since I lost it, I've been experimenting with -attedit. This command comes frustratingly close to what I'm looking for, except it only appends an existing tag, or replaces a specific string within the tag; I can't get it to replace the entire tag, regardless of its value.
1> Any lisp routine that does what I describe? or 2> How to make -attedit replace a tag value without regard to what the value currently is (like a * wildcard)?
If I add a DeepClone overrule on Initializeing a drawing it stops my block Jigs from showing correcly. I get a line drawn instead of the block. Other overrules I have used don't cause any problem.
By excluding the overrule from the initialize event it works fine.
I can remove then add the DeepClone overrule before and after the jig and it works ok but I really need it active on drawing startup.
Hit the brick wall again.
Ideally I don't use an overrule. All I need to do is understand what objects are being cloned before, during or after a clone operation but can't figure out the idmapping thing.
RE: Autocad LT not able to move an entity along a line a specific distance using cursor snap and dynamic input
What I want to do is move a line on an angle a certain distance in the direction of the line itself in this case 20mm
What used to happen is you'd simply select move and an endpoint on the line then hover over the mid or opposite endpoint of the line and enter 20 and it would move 20mm along the trajectory of the line.
The same set of actions now only seem to allow you to move the entity 100mm (the default value) along itself in the correct direction. If you enter 20 it does not move and if you enter 50 it moves 100!
When creating a new view of flighting on a tube part of it shows up like it should and part shows up as dashed lines and when you turn on "shaded" the parts that are dashed do not shade. All of the flighting parts come out of the same file and the tube is from a different file.
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:
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.
is it possible to create a block so that the base point is the only snap point on the block?
In other words supose I have a block of a simple rectangle with the base point in the center.
If I try to snap to the block, I will be able to snap to all the corners, but not the base point. I know that i can put a point at the base point, but can I turn off the snap to the corners (just for the block) in other words, have an object that is unsnapable to without turning the snap mode off.
I received a 3rd party drawing which contains a block to indicate directions. The block does not display its base point and I am unable to find it. why this block is not displaying the base point.
I'm creating a drawing for an iassembly, and I can't get the parts list to automatically show a specific configuration's BOM. I've tried filtering, "Ballooned Items Only," and that doesn't change anything. I've tried to create a parts list that looks at the child assembly, and the parts list reverts to the parent iassembly.
In the Browser, there's a lightening bolt next to each parts list in the tree. There are three parts lists/configurations.
The parts list lists parts that aren't in the assembly shown, and/or shows wrong quantities. I can manually update the bom, but I would much rather not. Is there a macro or add in that may be useful? I'll be making many prints from iassemblies, and this would be very useful.
Im trying to find a particular block amongst hundreds. I know the name of the block also what layer it is on i just want to be able to find that block through a search so i don't have to spend ages scouring the drawing to find it.
Is it possible to add a base depth to the transition lane assembly? I need to do volumes for my road, (pavement, base) but there is a section with a transition (which only has one depth), so that section is off.
I'm inserting blocks into my drawing and the block has a basepoint and a 0,0,0 point. The CAD guy who usually works with me is off today but he has a keyboard method of switching between the 2 points when inserting the block.
Its a fairly straight forward thing on his keyboard, nothing he has set up but standard in autocad.
I've had a try hitting a few keyboard buttons this morning but can't seem to do it.
I need to use the Handle of the cloned object during a DeepClone override but AutoCAD shuts down when I try to use it.
This is the best I can think of but it still boots me out when I try.
Public Overrides Function DeepClone(ByVal dbObject As DBObject, ByVal ownerObject As DBObject, ByVal idMap As IdMapping, ByVal isPrimary As Boolean) As DBObject Try Return MyBase.DeepClone(dbObject, ownerObject, idMap, isPrimary) Catch Finally CompileCloneObjects(dbObject.Handle.ToString, MyBase.DeepClone(dbObject, ownerObject, idMap, isPrimary).Handle.ToString) End Try End Function