AutoCAD .NET :: Cursor Pick Object Event
Feb 8, 2012
i am trying to make a custom palette to display some custom information pulled out from selected objects.i can deal with the palette part.
i want some code for when you click an object in model space then the property palette updates. i am gonna keep it simple so this custom palette only refresh to the last selected object. but i don't know how to make an event when mouse click the autocad object and then do my things. any codes in c# or vb.net would be nice.
so use commandmethod load in a command and there will be a palette there stay open, when user click on an object then it will get populated. what event do i use for the clicking?
View 4 Replies
ADVERTISEMENT
Aug 3, 2013
How to use an embedded cursor (mycursor.cur) via the SetCursor command under user interaction events. I can use built in cursors just not able to get it working with my resource.
Sample below throws an error type mismatch.
oInteraction.SetCursor(CursorTypeEnum.kCursorTypeCustom, My.Resources.mycursor)
I have set the build action of the cursor to be embedded.
View 3 Replies
View Related
Apr 11, 2011
I am developing a .NET application that integrates with AutoCAD Architecture. In my .NET application, I provide my user with a list of drawing files (.dwg) that they can choose to open. Once my user has selected a file, my application will open the selected drawing in AutoCAD Architecture. In this drawing, the user can click on an object in the drawing.
Can this mouse click event be captured and the object ID for the selected object be returned to my application?
View 2 Replies
View Related
Aug 25, 2005
Is there a tool out there that will allow me to pick an object and change it's layer properties?
View 9 Replies
View Related
Nov 6, 2011
I am going to collect objectid's of the moved items in drawing after they moved to destination. So I wrote an event to monitor move command , by using object modified event handler. when I run below code for every entity it collects 2 object id. One before move and one after move. Is there any way to just collect object ids after they moved?
Class EVENTS
Dim MyDwg As Document = Application.DocumentManager.MdiActiveDocument
Dim Myed As Editor = MyDwg.Editor
Dim Mydb As Database = MyDwg.Database
Dim Myobjidcoll As ObjectIdCollection
[Code]....
View 3 Replies
View Related
May 26, 2011
I am trying to use conform, but when I pick the wrap to object, it inherits the material of the wrapper object. I am using active viewport and I am aligned directly over the object to be wrapped to. What am I doing wrong?
my specs are this quad processors, 8 Gb RAM, windows xp64bit, 3ds max 2011
View 3 Replies
View Related
Jul 11, 2013
Is there a way to tell maya to automatically center orbit to whats selected without having to hit "f" key everytime you pick a different object, vert, edge, etc.?
View 1 Replies
View Related
Aug 2, 2013
I have a button which has a mousover/mousout animation. When i click the button, it will shrink down to 0%. when it does, my mousout event is triggert, which i dont want.
how can i disable the mousout event after the click event?
View 4 Replies
View Related
Sep 26, 2012
Accelerator Keys
My accelerator keys for the right-click object-snap cursor menu do not work. For example, I will be drawing a line and I will bring up the object-snap menu, then I will select ‘E’ for endpoint snap, the ‘e’ will display in the dynamic input window and the snap does not work.
View 2 Replies
View Related
Mar 14, 2014
I've relaunched and tried re-installing Illustrator CC twice and didn't solve this unexpected crash problem. It has never happened since I paid for this software months ago.
Illustrator won't crash when:
- using the keyboard arrows to manually move any path or drawn shapes/ objects
- using my wireless mouse to draw objects/ new paths from clipboards, colour boards etc.
Illustrator CRASHES when:
- using my wireless mouse and macbook's touchpad mouse to move any new or old drawn paths/ objects/ shapes/ lines etc.
In my Opinion - ROOT OF PROBLEM:
- Wirelss and macbook's touchpad mouse cursor causees it to hang then crash 1 minute later.
Why would my mouse cursor suddenly be the cause of this crash problem when it was working fine all along?
Below is the error message, I use this software to run my design business.
Process: Adobe Illustrator [18899]
Path: /Applications/Adobe Illustrator CC/Adobe Illustrator.app/Contents/MacOS/Adobe Illustrator
Identifier: com.adobe.illustrator
Version: 17.1.0 (17.0.0)
Code Type: X86-64 (Native)
Parent Process: launchd [122]
User ID: 501
[Code] ....
View 5 Replies
View Related
Dec 14, 2012
My cursor appears and disappears while in GIMP as I move the cursor over the canvas. I can make the cursor appear but only if there is no movement of the cursor. It makes no difference which tool I select, the size of the canvas, or the level of zoom.
Please note that this only occurs in Gimp, and none of my other applications. It started when I upgraded from openSUSE 12.1 to 12.2. I'm assuming that it has something to do with my input device configuration, but I could be totally wrong.
I have a total of 3 input devices - Core Pointer, Logitech USB-PS/2 Optical Mouse, and Virtual Core XTEST Pointer. Both the Optical Mouse and XTEST Pointer are DISABLED. Core Pointer is the only one enabled. Enabling Optical Mouse and XTEST Pointer give me other problems in Gimp and need to remain disabled.
For the Core Pointer, Mode is set to SCREEN, a message says that 'The axis X has no curve', and the following Axis Settings:
X 1
Y 2
Pressure none
xtilt none
ytilt none
wheel none
In Gimp Preferences->Input Controllers, there are three active controllers - Mouse Buttons, Main Mouse Wheel, and Main Keyboard.
OS: Linux 3.4.11-2.16-desktop i686
System: openSUSE 12.2 (i586)
KDE: 4.8.5 (4.8.5) "release 2"
Display Info:
Vendor: Intel Corporation
Model: G33
2D driver: intel
3D driver: Unknown Gallium (9.0.1)
View 3 Replies
View Related
Sep 30, 2011
I have programmatically created a block, which resembles the protective tube schematically drawn. The block consists of two ellipses of connected the two lines. This block tries to modify (also programmable). The modification consists of changing the position of the ellipse and the length of the line. Everything (almost) goes smoothly, until the pipe extends beyond its original length. The changes are visible, but I'm not able to pick the block beyond its original contour. So I can pick out such lines, if picked point is on the original length, but beyond its original length is not already. The same applies to the ellipse. The situation returned to normal, if I tried stretch the block (base point) or command _move. Regeneration of the model does not work.
I throw a piece of
using( Transaction tr = doc.TransactionManager.StartTransaction() ){//Block?Entity ent = tr.GetObject( per.ObjectId, OpenMode.ForRead ) as Entity;(...)BlockReference blRef = ent as BlockReference;(...)Ellipse ell1 = null;Ellipse ell2 = null;Line line1 = null;Line line2 = null;BlockTableRecord btr = tr.GetObject( blRef.BlockTableRecord, OpenMode.ForRead ) as BlockTableRecord;foreach( ObjectId entId in btr )
[Code] .........
View 1 Replies
View Related
Aug 8, 2013
I have a file that is behaving very oddly. Its a detail that I cannot pick some lines on in world UCS, but in Isometric views will pick ok, and to make matters worse, when I do a regen the lines in question vanish.
File attached, refer to AS DRAWN MKGP2, top left of drg sheet 324125_JJ_005_A.dwg
View 9 Replies
View Related
Jan 4, 2012
I was drafting away, and all of a sudden my crosshairs and pickbox disappeared. Once I move the mouse there's nothing in my drawing plane. I can type commands, and when I move the mouse up to the menu area I can pull down menus. I've opened up other drawings and the crosshairs and pick box are there.
What can I do to resolve this? Of course it happens during a deadline.
Using Autocad version 2009, windows 2007, Professional
View 6 Replies
View Related
Mar 16, 2012
In selecting a point in a drawing to connect new poly lines to existing objects, is there a way to set the order to which osnap elements are used?I have perhaps 1/2 of the osnap element settings activated. End point, Mid point, Node, Intersection, etc.
When I go to select, it's like everything EXCEPT End Point is recognizing. And while I can go to right click, and select end point, I am now wondering, if besides the rt click, there is a way to preset the priority, or order in which the osnap elements recognize the type.Without resetting the settings each time.
View 9 Replies
View Related
Dec 5, 2011
Private Sub ObjectModified(ByVal sender AsObject, ByVal e As Autodesk.AutoCAD.DatabaseServices.ObjectEventArgs)
With e.DBObject
If .IsWriteEnabled Then Exit Sub
If .Id.ObjectClass.Name = "AcDbAttribute"Then
?????
End If
End With
End Sub
Trying to read the attribute's tag and text.
View 2 Replies
View Related
Feb 27, 2014
In Xcode, we have to define cursor as:
resource 'CURS' (16001) {
$"00 00 00 00"
$"18 00 3C 00"
$"1E 00 0F 00"
$"07 80 03 C8"
$"01 E8 00 FC"
[Code]...
In Windows we use .cur file, simpler.
I want to convert .cur file to the mac format above, how?
View 1 Replies
View Related
May 17, 2012
I'm writing a program (C#) that automates the notch tool within the frame generator add-in in Inventor. I can select one part and then select multiple other parts that will notch to the first selected part automatically. This will save me a TON of time if I get it working correctly. With that being said, I have it to the the point where the user selects the first part and then window multiple parts (these are stored and then cycled through later), then I use SendKeys to open the "Notch Tool", and now this is where I encounter my problem.
The Notch Tool is waiting for the user to Pick/Select one part. In my code I've tried to use the CommandManager.DoSelect method which does not register with the tool (I'll exit out of the tool and the part will be selected). My thinking is that this notch tool will only accept the CommandManager.Pick method which would defeat the purpose of the program as I do not want the user to have to go through the parts one by one notching them together.
Is there a way to simulate a mouse click on a selected occurrence within Inventor? Is there another approach I should be considering? And finally, how to rewrite the actual notch tool to allow multiple notches to be done at once?! I'll post a snippet of my code.
docName = instance.ActiveDocument.DisplayName;
int iHandle = NativeWin32.FindWindow(null, "Autodesk Inventor 2012 - [" + docName + "]");
this.Hide();
NativeWin32.SetForegroundWindow(iHandle);
keybd_event(0x23, 0x4F, 0, 0); // Press End
keybd_event(0x23, 0xCF, 0, 0); // Release End (Brings up notch tool)
Thread.Sleep(3000);
//keybd_event(0x28, 0x0F, 0, 0); // Press Tab
//keybd_event(0x09, 0x8F, 0, 0); // Release Tab
NativeWin32.SetForegroundWindow(iHandle);
Thread.Sleep(500);
instance.CommandManager.DoSelect(vert);
View 2 Replies
View Related
Jan 23, 2007
I want to create a function to pick a profileView(Alignment/.. in the future) in the drawing. I just get entity which type is Autodesk.AutoCAD.DatabaseServices.ImpCurve from GetEntity, and I failed when I try to cast it to Autodesk.AECC.Interop.Land.AeccProfileView. Is there any way I can pick a profile from drawing in .net?
Civil 3D 2007 and Visual Studio 2005
View 2 Replies
View Related
May 15, 2013
Have noticed that on an AutoCAD 2013 workstation when the user make an ambiguous pick (that it, pick on top of two or more overlapped items) instead of just selecting one of them, there will appear a list box (whose caption is "Selection") containing all entities that may be selected in that spot and also None option. The user may pick the entity(ies) he/she want to have selected, but this behavior also prevents dragging the entities (since the said list box is shown again).
View 9 Replies
View Related
Apr 26, 2011
How do I get an onscreen point after/ during a VB.net dialog box is launched (as example like with Hatch add pick points. I would like to create button for this in a vb.net dialog box?
View 4 Replies
View Related
May 22, 2011
I am having a lag problem when quickly zooming in or using the selection window quickly. When quickly picking a window from left to right the first pick point lags and I would select some thing else. Iam using Cad 2012. Is there a command setting that has changed from Cad 2011 to 2012 ??
View 1 Replies
View Related
May 16, 2013
I am having trouble with my selection box. Ordinarily, when I am trying to select multiple object, I can just create multiple selection boxes and it keeps adding more and more objects to my selection. However, it recently started acting funny--it stopped selecting things after the first box was drawn. No matter how many boxes I drag, it won't add any more objects to my selection.
View 3 Replies
View Related
Mar 13, 2009
I have a block with a rotation parameter/action. I can't seem to get the rotation "circle" to stay in the same spot relative to the block when I rotate. Example: I make a block of a circle. Go into block editor and put a rotation on it with the base point in the center. Move the blue rotation circle to the center. Close block editor and do a rotation. The "rotation pick circle" will not stay in the center of the circle.
View 2 Replies
View Related
Apr 18, 2011
how can i pick up lots of nodes in shortest way (not to pick it one by one) to become red (editable)!?
View 9 Replies
View Related
Nov 29, 2013
In my plug-in I have some datagridview to show alignment data of all alignments in drawing.
I have a button called (regen) to update data in these datagridviews. I read again database drawing and re-source again datagridview. (method "upload_all")
I have read some posts and blogs about this: [URL] ....
and about overrule: [URL] ....
But I don´t understand almost.
I only want to execute method "upload_all" if some alignment is modified in the drawing.
Also, I would like to do it if some alignment is just created or deleted.
Autocad Civil 3D 2014 +SP1
Quad Core Intel i7 3770-cpu 3.40Ghz.
ssd samsung 840 pro 512gb+ssd samsung 840 pro 256 gb+1tb hdd
32gb RAM 1600 Mhz.
nVidia Quadro 2000.
Win 7 Pro 64bit
View 1 Replies
View Related
Mar 31, 2013
Is there any Event or ApI to get the Point3D when the mouse is moving using .net
I want to get Point3D when the mouse is moving just as CAD shown on lower left corner. Is there any way to get it with .net?
View 2 Replies
View Related
Jul 17, 2013
I want to catch drawing modify event, that means if user start to edit current document I want to give a message to user.
View 3 Replies
View Related
Jun 15, 2011
why does the DocumentCreated-Event fired two times. Thats a problem because the code within the event-method must only execute one time.
View 2 Replies
View Related
Jul 9, 2012
There is an event at the show of multiselect ribbontab on Civil3D?
View 4 Replies
View Related
Dec 11, 2012
I have a group of classes that essentially implement the Model View Controller pattern. The view is a custom control contained in a PaletteSet. The Model is a class that wraps the ObjectID of a given block. I've used these classes to create a replacement for the Properties tool in AutoCAD (2011). Basically the UI can be used to edit the properties of a Dynamic Block. But I apply my own rules and behaviors to the UI.
I had no problems until I added support for the View to be updated when the block is modified (say by dragging to increase a length property). To do this I handle the Modified event of the block. After the block is modified, some rules are evaluated. If the rules result in changes to the block's properties, these changes are applied. This last part is where I'm having trouble.
When the "Rule Evaluation" code is invoked because of changes to the view (WinForms Controls), I am able to update the block's Properties using the following code without issue:
Public Shared Function SetParameter(ByVal BlockID As ObjectId, ByVal ParameterName As String, ByVal Value As Double) As Boolean
Using dl As DocumentLock = Application.DocumentManager.MdiActiveDocument.LockDocument(DocumentLockMode.ProtectedAutoWrite, Nothing, Nothing, True)
Using myTrans As Transaction = BlockID.Database.TransactionManager.StartTransaction
Dim myBRef As BlockReference = BlockID.GetObject(OpenMode.ForWrite)
For Each myDynamProp As DynamicBlockReferenceProperty In myBRef.DynamicBlockReferencePropertyCollection
If myDynamProp.PropertyName.Equals(ParameterName, StringComparison.OrdinalIgnoreCase) Then
myDynamProp.Value = Value
myTrans.Commit()
Return True
End If
Next
Return False
End Using
End Using
End Function
However, when this same code is invoked as a result of the BlockReference Modified event, AutoCAD completely crashes the momment the transaction.Commit() method is called. I've attempted to catch the exception causing the crash and role back the transaction, but AutoCAD simply exits and displays the error (Error handler re-entered. Exiting now.) and no exception is caught. Note that I do not use the BlockReference instance passed to the Modified event handler. Instead I store an ObjectID instance elsewhere which is consistently used to read/write the block.
Is there something I must do before commiting a transaction when using the Modified event of BlockReference? I checked, and the same "Main Thread" is executing whether the code is invoked from a UI event or the Modified event. I tried calling the Close method, which is attributed as Obsolete, on the BlockReference object before executing the transaction without any success.
View 3 Replies
View Related