AutoCAD .NET :: Select Entity Or Pick Insertion Point?
Aug 4, 2011
know if there is a command which joins GetEnttiy() and GetPoint() functions. At the moment I'm using both commands one after another. Result I want would be one command where you can choose entity or select insertion point.
I am looking for some code that would allow me to select a MTEXT Entity - or other entity - (as the DEFAULT option) but also to allow me to type in some text manually or to pick a point in the drawing. Something that would present the user with:
"Select an object or [P to pick a point]" or
"Select MTEXT or [M to type].
I can write some code to type in text manually as the default option and get the second option to select entity using get string and then write some condition of if code but I don't know how to do it having entsel as default option.
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?
I am trying to understand how to select element of pick point through API.
I have found example in API manual, chapter "Interactive selection". Everything seems be clear but finally this example (and also others which I have found on web) doesnot work as I am expecting.
There is example:
Public Sub TestSelection() ' Create a new clsSelect object. Dim oSelect As New clsSelect ' Call the pick method of the clsSelect object and set ' the filter to pick any face. Dim oFace As Face Set oFace = oSelect.Pick(kPartFaceFilter) ' Check to make sure an object was selected. If Not oFace Is Nothing Then ' Display the area of the selected face.'''' there is cursor and content menu correct [code]...
I am able to select face, during selection is cursor shown as arrow with plus symbol, content menu show correctly zoom and pan commands. Unfortunatelly when this selection is done and message box show the value, the cursor and content menu does not return to correct state. Cursor is still with plus and content menu with zoom&pan. I have found that problem is with messagebox, just before messagebox is shown the cursor and content menu return to correct state , but after messagebox is shown and closed, then cursor and content menu is wrong. Why?
Finally I need it for my addin in C#, is there and better way how to select item or input 2d point?
When I select a block, all points contained in the block are shown. How do I turn this off? I want to select the block and have only the insertion point showing.
We have been modifying a trim-around-block routine to have as few clicks as possible and though it feels like we'd be able to have the line to be broken auto-selected based off of the insertionpoint that was set as a variable.
;(setq ss (ssget '((0 . "LWPOLYLINE")))) ; limited to Polylines ; (while (> (sslength ss) 0) ; as long as there's anything in [or remaining in] the selection set)) ; (setq ent (ssname ss 0) ; paramcount 1 ; ) ; first entity in [or remaining in] the selection set paramcount 1); end setq
are about the closest snippets of code that we've managed to find but neither of these are working.
How we can force the program to break the line without the user having to select the line (because they will have already selected the insertpoint, and using osnap nearest would find the line that requires breaking)
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'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.
I am new to Inventor API, but have some experiences in SolidWorks API.
How can I select an entity at a given spacial point (x, y, z)? For example, I want to select a face or edge that is on a given (x, y, z) point. I can not find such an API, except for interactive selections.
i dont want use editor (i don't want use CommandFlags.Session)
after the load in the database (see my code for xdb), i want to select all bloc within a closed line entity (within the xdb)
but how to do that whitout editor (editor..SelectWindowPolygon )
here my code for load each file , and mémorize all block for each file
Dim CollDocOuvert As New Collection For Each NomFichier In Fenetre.CollFichier 'recherche et extraction des blocs Dim Fichier As New IO.FileInfo(NomFichier) If Fichier.Exists = True Then GestionAUTOCAD.TxtOnLigneCOmmande("Gestion du
[Code]....
StatusLabelBar is a component of my form for write msg. is use me.refresh and a timer (1s) for refresh my form. (a trick i have found for do this [if you have better trick i take it.])
I have modeless dialog. On dialog I have button on which user clicks, when he wants to pick insertion point. Problem is when I exit dialog the command line is still in command GetPoint (doesn't show usual Command.My code at the moment is:
// this.Visible = false; AppServ.Document adoc = AppServ.Application.DocumentManager.MdiActiveDocument; AppServ.DocumentLock dl = adoc.LockDocument(); Editor ed = adoc.Editor; using (ed.StartUserInteraction(this)) { [code]....
I have a VBA to insert a block I ask the user for an insertion point GETPOINT. Then I allow the user to select an angle. GETANGLE starting with the insertion point. If the user picks a point or enters a number there is no problem.
However if the user hits enter it crashes saying invalid input. What I want to happen that if enter happens it accepts it as an angle of 0.
I have drawn some doors and saved them as blocks. Whenever I insert one or another, the door itself is far away from the insertion point. How can I modify this?
I need my users to pick a point p, enter a distance r and a direction v. A new point should be created r units away in vectorial direction. Therefore, the new point is located on an imaginary circle with radius r and center p.
Currently, the user picks the first point and enters a distance. Then, he has to pick another point (Editor.GetPoint with UseBasePoint = true), I calculate the vector between both points, create a new point (with location = BasePoint.location) and translate it d units in vectorial direction. This works of course, but the problem is, that the user doesn't see directly, where his new point is located, since he may pick a point closer to or farther away then r units.
Naively spoken, I want to restrict the line between BasePoint and new point while prompting the user to a fixed length. Native calls to ObjectARX-methods would be also okay.
I've been going through some examples on [URL] to create polylines and i've managed to make some code run. One thing that I can't seem to find information on though, is how to use the default AutoCAD command line options in my code. For instance, I would like to be able to prompt the user whether they would like to snap the polyline to an insertion point, everytime they create a new verticie.
Below is some example code from the site that i'm working from:
I create a block where coordinate 0,0 is my base/insertion point (which is established in an orientation that is to the lower-left of my blocks line work). In a new drawing I insert that block and specify coordinate 0,0 as my insert point. Instead of my insertion point being in the lower left it is in the upper right. I run into this in new version and old version drawings.
When editing multileader text, the insertion point changes. How do I stop this? I have several multileaders with their insertion points aligned together (left justified notes) but if I edit any text, the multileader jumps to a new position and is no longer aligned with the other notes.
Currently, I have the base or insertion point of some of my blocks in an undesirable spot and I would like to move it. When I insert a drawing or block I have difficulty in placement due to a poor choice in the drawing or block I am trying to insert.
I created a dynamic block with a polar stretch. I insert the block, then have to select the grip to rotate/stretch it. Can it be inserted and then rotated/stretched all in one action? The insertion point is at one of the line and the polar stretch grip is at the other end.
I'm wondering if there is a lisp possible to measure area's by pick point (as in bpoly). This little feature exists in Microstation so i was looking for something similar.
Is it also possible if this lisp can measure areas from an external reference (dwg, dxf, dgn, shp etc..)? I'm kind of new to AutoCAD in that sence.
When i edit the sketched symbol "Work Stages", i copy the line which the the arrow points at, but with it goes the green insertion point, and i can't delete it.
How to create a sub-assembly with an insertion point parameter using Sub-assembly composer.
like this one below. I found this under the following sub-assembly. All I want is , when the user inserting the sub-assembly they may need to go on both the sides attached.
Example:
So the user should be able to select from the dropdown if the insertion point is 1 or 2. Before inserting.