AutoCAD .NET :: Cloned ObjectID Or Handle Using An Overrule

Aug 19, 2011

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

View 2 Replies


ADVERTISEMENT

AutoCAD .NET :: How To Select Object Via ObjectID Or Handle

Jul 29, 2011

Question,

I have a list of blocks in a datagrid. When i double click a certain record it gets the objectid or handle.

Now i know how too highlight the object. But i don't want to highlight the entity but select it so i can change it's property's in the property pallet.

In the first screen shot you see the code i have. wicht highligts the record but the propperty pallet display no object selected.

But i want it to work like the next picture.

So the question is. When i know an entity's objectid or handle how do i select that entity programticly.

View 2 Replies View Related

AutoCAD .NET :: Selecting Objects On Screen From Handle Or ObjectID

Feb 15, 2013

If I have a list of handles for Autocad Entities, how would I go about selecting these entities on screen so that the user could add to this selection or remove objects from the selection?  I could go with object ids as well if needed.

I have been searching and searching and coming up empty handed or at least coming up with information that doesn't seem to do what I want.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert ObjectID To Handle

Jan 10, 2012

I wrote code for an application that stores links to lines and blocks in dictionaries using handles.  The routines work well and I can manipulate the data marvelously, but if one of the lines or blocks get erased the whole danged opera falls apart.  I knew this when I wrote the routines and have always been careful about using the ERASE command, as a matter of fact, I considered disabling it.

I am trying to make the package more robust.  I have been experimenting with attaching a reactor (:vlr-erased) to the objects which fires when the object is erased.  Unfortunately it fires before I can retrieve the handle of the object so that I can remove the references from the dictionaries.  The only thing that I can retrieve once ERASE fires is the ObjectID.  I can't seem to find a Visual Lisp routine to convert this value to a handle, does one exist?  Is there an ObjectID collection that has any references in it?

View 2 Replies View Related

AutoCAD .NET :: Select Overrule Entity

Jul 23, 2012

I have a question regarding object overrule.

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).

View 3 Replies View Related

AutoCAD .NET :: How To Overrule On Custom Object

Aug 9, 2012

I want to change display of custom object using overrule.

First I made a class implements from polyline.

class BoundaryPolyline : Autodesk.AutoCAD.DatabaseServices.Polyline { }
 
Second I made a polylineJig to draw my custom polyline(BoundaryPolyline).

 public class PolylineJig : EntityJig { public PolylineJig(Point3dCollection p3ds) : base(new BoundaryPolyline()) { ... } ... }

 And then add overrule on BoundaryPolyline to change display of it.

Overrule.AddOverrule(RXObject.GetClass(typeof(BoundaryPolyline)), mydrawOverrule, false);

 But when I loaded dll, fired overrule and redraw. All polyline display were changed.

Then I found that 'RXObject.GetClass(typeof(BoundaryPolyline)' was return 'Polyline' but not 'BoundaryPolyline'.

How to overrule on custom object.

View 5 Replies View Related

AutoCAD .NET :: Overrule Control In BlockReference?

Jun 26, 2012

I am working on simple WorldDraw overrule where lines and polylines are displayed with little cross. Size of cross is related to view size.

Everything works fine except blocks and Xrefs. If they are scaled then crosses are scaled as well.

I know how to get entity owner ID but it refers to BlockTableRecord only not to BlockReference.

View 3 Replies View Related

AutoCAD .NET :: Placing Text On Cloned Object?

Feb 5, 2013

The setup, im attempting to create mtext aligned to the selected object at the point nearest to where i select, this works fine for active objects, but is failing when it trys to calc the angle on nested objects

(Line 106,
Dim
fder AsVector3d = bah.GetFirstDerivative(inspt)
)

i think this is because the point is not associated with the cloned (from xref) object? any thoughts on how to get it to work with the single object selection/insertion point prompt? in the meantime ive re-written to have a second prompt for the insertion point, which works on the cloned object.

Heres the Imports

SystemImports Autodesk.AutoCAD.RuntimeImports Autodesk.AutoCAD.ApplicationServicesImports Autodesk.AutoCAD.DatabaseServicesImports Autodesk.AutoCAD.GeometryImports Autodesk.AutoCAD.EditorInput<Assembly: CommandClass(GetType(Line_Labler.snibbity))> Namespace Line_Labler Public Class snibbity <CommandMethod("linelabel")> Public Sub snabble()

[code]...

View 6 Replies View Related

AutoCAD .NET :: How To Store ObjectID

May 31, 2012

I can store some ObjectId from my drawing to text file. After that how we can get back ObjectId from string read from that text file. Or have a diferrent way to store the ObjectID.

View 3 Replies View Related

AutoCAD .NET :: DeepClone Overrule And Dynamic Block Jigs

Aug 17, 2011

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.

View 1 Replies View Related

AutoCAD .NET :: Overrule Attributes (properties) For Complex Objects

Jan 6, 2013

I am about to write the function using Overrule API to temporary override object’s colour to ByLayer for all entities in the drawing.

At this moment I just have simple class for testing (just to check if it is possible) and so far I can see problem with complex entities.

Entities such as Line, Polyline even BlockReferences work fine  but complex objects like HATCH, MTEXT and LEADER do not change colour as set in SetAttribute method.

Below is simple class I was testing.

public class ByLayerColorOverrule : DrawableOverrule
{
public override bool WorldDraw(Autodesk.AutoCAD.GraphicsInterface.Drawable drawable, Autodesk.AutoCAD.GraphicsInterface.WorldDraw wd)
{
base.WorldDraw(drawable, wd);
return true;
}

[code]....

View 8 Replies View Related

AutoCAD .NET :: How To Add Hatch To Closed Curve In Drawable Overrule

Apr 11, 2013

My goal is to write a Drawable Overrule, which would change the entities color to dark gray, except when they are on a specific layer. For closed-only curves in this layer, I want to add a semi-transparent hatch.

All works great, until user moves the mouse over this hatch : AutoCAD throws a fatal error and closes. I've no exception in debugger...

When I remove the code concerning the hatch, I've no error at all.
 
Public Class ClosedCurveDrawableOverrule Inherits DrawableOverrule Public Const HighlightColorIndex As Short = 1 'Color Red Public Const BaseColor As Short = 251 ' Color DarkGray Public Const SpecificLayer As String = "Layer1" ' Set our transparency to 50% (=127) ' Alpha value is Truncate(255 * (100-n)/100) Public [code].......

View 3 Replies View Related

AutoCAD .NET :: Convert String To ObjectID

May 2, 2006

It is possible to convert an ObjectId into a string. But is it also possible to convert a string/int into an ObjectId?

I want to save some ObjectIDs to a text-file to use them later. But I haven't found something to convert them back.

View 7 Replies View Related

AutoCAD .NET :: Convert Entity Name To ObjectID?

Jan 3, 2012

I commonly send serialized data to .net functions.

One of the items I send in the entity name of something as a string.

Once my .net function is done, it constructs a resultbuffer to send back to lisp.

I had been doing this:

AcDb.ObjectId id = new ObjectId(Convert.ToInt32(ename));
 
but the Convert function is throwing an exception.

I do not recall this happening before, but forget if I ever tested it.

I am on win 7 64 bit.

View 9 Replies View Related

AutoCAD Civil 3D :: Having Custom Commands Cloned And Customized From Existing

Aug 14, 2013

I have the "create section view" command.

Ok,  I'd want to have other (others) custom command "create section view2" and optionally call it from an icon.

These commands are saved with the drawing? ( I think yes). Would be there a possiblity to have easy access to this elements to deal with them ?  Is it impossible?

Having custom commands cloned and customized from existing

View 1 Replies View Related

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].......

View 9 Replies View Related

AutoCAD .NET :: Erase Hatch Using Polyline ObjectID

Aug 18, 2012

I have a drawing with a Polyline filled with Hatch. Also I have that Polyline ObjectId. So using this ployline ObjectId I want to erase the Hatch inside polyline. How I can erase the Hatch.

I'm developing the application using C#.

View 9 Replies View Related

AutoCAD .NET :: Obtain Certain Vertexes Via Polyline ObjectID?

Jul 31, 2011

I create a polyline ,and then add it's objectId to a ObjectIdCollection defined by me.After the polyline is created,I would like to obtain it's second and sixth vertexes via this polyline's objectId.

View 6 Replies View Related

AutoCAD .NET :: Have ObjectID Of Block Need To Retrieve Info

Sep 3, 2013

I have stored within an external database a handle of an entity within a drawing.  If I have that drawing open and I retrieve that handle and then get the ObjectID from that Handle how do I convert that to a BlockReference so that I can then get position and attrribute values.  I can get the position and attributes if I can just get the blockreference from the Object ID.

I am using the following code to get the ObjectID from the Handle:

Public Function ObjectIdFromHandle(db As Database, strHandle As String) As ObjectId Dim nHandle As Int32 = Int32.Parse(strHandle, Globalization.NumberStyles.AllowHexSpecifier) Dim handle As New Handle(nHandle) Dim ids(0) As ObjectId Try ids(0) = db.GetObjectId(False, handle, 0) Catch ex As Exception MsgBox(ex.Message.ToString, MsgBoxStyle.Exclamation, "Error in ObjectIDfromHandle") End Try Return ids(0) 'Return db.GetObjectId(False, handle, 0) End Function

I then want to use this ObjectID to get the BlockReference.

View 4 Replies View Related

AutoCAD .NET :: Create Object And Get ObjectID Or Add To Collection

Nov 8, 2012

I trying to create an autocad obbject eg: line. after creating i need to add object data to the created object.

unfortunately i am not able to get the objectid of the created object.

code snippet on how to do this..

1. creating a object and add the created object to collect or selectionset

2. get the object id or refernece so i can attach object dat relavent to the objedt...

View 5 Replies View Related

AutoCAD .NET :: ObjectClass Is Not A Member Of ObjectID (2008)

Mar 25, 2013

I need to make my application compatible with 2008 and have one error saying that ObjectClass is not a member of SubEntId (As ObjectID) in my InsertBlock routine.
 
Public Sub InsertBlock(ByVal blockname As String, ByVal trans As Transaction) Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database ' Test if block exists in the block table Dim bt As BlockTable =

[Code]....

View 9 Replies View Related

Photoshop :: How To Rotate Cloned Sample

Mar 17, 2013

How do you rotate the cloned sample with the keyboard - like i said it can be done i just can't remember

View 3 Replies View Related

Photoshop :: CS6 Off-line Activation For Cloned Clients?

Nov 21, 2013

My job requires that we have no internet access. I currently deploy our clients using a cloning machine. I create a master image and clone to our clients with all applications installed.

I would like to be able to include the activation before I clone to the clients. I watched the video for AAMES and it mentioned about a workaround for cloned clients. It also said there was a video available on the topic.

View 2 Replies View Related

Photoshop :: Cloned Area Comes Out Much Softer And Blurred

Aug 29, 2012

Clone tool, in that when I clone (let's say grass as example),  the new cloned area does NOT come out as sharp as the area selected.  It comes out much softer and somewhat blurred.  I have the opacity and flow both set at 100%.  This is very frustrating since I can not get a true clone.

View 5 Replies View Related

Photoshop :: How To Rotate Cloned Stamp Selection Using Keyboard (windows OS)

Oct 29, 2012

So, I use the clone stamp and have my selection floating on my screen. My question is... how do I rotate it using the keyboard? I've done this before but cannot remember the keys.

View 3 Replies View Related

GIMP :: Parallel / Cloned / Twin Layers For Tiled Textures?

Jul 3, 2013

I'm currently using GIMP for making textures for a 3D game. These textures are drawn by hand and making those "tileable" is a bit awkward most of the time. There's all sorts of manual methods but I'm wondering if there's something that will take care of this in real time. Anyway what I'm looking for:

Is there a way to create layer groups which contain the very same layers at different locations? Or displaying the same layer group in two places next to each other? So stuff I draw in one place is "cloned" in real time to another layer or group? What I want is the ability draw seamlessly, so when I draw at or past the layer borders on the bottom I automatically draw at the top border.

I can kinda achieve this manually either by offsetting a layer or by making the layer bigger in size than the texture I want and then cutting and pasting the details beyond the actual texture size to the opposite side. But those are very awkward procedures, especially when working with many layers that have to be drawn and edited separately. Is there maybe some automated feature that takes care of this for me in real time?

View 3 Replies View Related

AutoCAD .NET :: Add New Grip Point With Grip Overrule

Oct 18, 2012

Before I will explore Grip Overrule world I have one question. Is it possible to add new grip points into Entity?

View 6 Replies View Related

CorelDRAW X6 :: Trim Master Object And Cloned Object Gets Deleted?

Apr 3, 2012

4621.CorelDRAW Clone Bug.mp4

Trim the master object and the cloned object gets deleted.The master object cannot be directly trimmed, so I grouped it with another object, which seems to enable the shaping tools. check if this behavior exists in X5 also.

I have inserted a clip about the problem. Maybe other users and the Corel staff will check it out.

View 2 Replies View Related

AutoCAD VB :: Object ID To Handle

Jan 26, 2012

I am trying to delete records from a database file by using the erase event of the AutoCad Document Object, that is:

Private Sub AcadDocument_ObjectErased(ByVal ObjectID As Long)

My problem is that my database identifies objects by their handles in the drawing file.  How do I convert the ObjectID into the object handle?  I tried:

strHandle$ = Hex$(ObjectID)

but it didn't return the handle of the object that was being deleted

View 2 Replies View Related

AutoCAD .NET :: Handle Multiple Instances

Feb 5, 2013

I need to connect to specific instances of AutoCAD and Plant3D. The Running Object Table (ROT) only holds one instance so GetObject wont work.

I've tried getting the correct instance using the hwnd with the AccessibleObjectFromWindow function. I'am thinking the easiest way is to autoload a plugin to communicate with, maybe through a service.

View 8 Replies View Related

AutoCad :: How To Add New Control Vertex And A Handle

Jul 4, 2013

How to add a new control vertex of a spline and how to show the handle of the spline such as in Adobe Illustrator?

View 1 Replies View Related







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