AutoCAD .NET :: Selecting Text At Insertion Point Of Other Text
Dec 3, 2012
I need to create a little application (Not the firt one in .NET but my first one for Autocad in C# .NET).
What do I need to do ?
User select texts on screen. => Making a Selection Set of those selected texts. DONE
For each select text is on screen another text (on another layer) with the same coordinates.
For each text in the first Selection Set, I try to create a second SelectionSet (filtered to select text only, named acPSResPCode) but that SelectionSet stay always null. If I make the SelectionSet without filter I select every lines in the crossing windows, but no text are selected.
Here's my code (PS : Code for AcadMp 2010)
[CommandMethod("SelectionPP")] public void SelectionPP() { //Récupère le document courant, sa base de données, et demarre une transaction Document acDoc = Application.DocumentManager.MdiActiveDocument; Database acCurDb = acDoc.Database; //Récupération de l'éditeur de la base de données courante Editor ed = acDoc.Editor; //Démarre une nouvelle transaction using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction()) { //Création
[code].........
Sometimes I have MLeader text without Mleaders (ie, I remove the leader arm using MLEADEREDIT). Then when I go to edit this 'floating note', the base point moves:
In this screenshot, I've just finished editing the text. Note that I added in the diagonal line at the current insertion point of the Mleader text (top right):
Then, after I click outside the Mleader box, the text moves:
THis happens only with right-aligned MLeaders, and keeps happening, ie if I edit this text again and close it again, it will move again.
Is there a way to modify the text insertion point of multileaders using lisp? We have a problem with some of our multileaders getting a landing distance set to a negative value. My lisp routine will correct these to a default value, but then the text jumps a bit. If I could get the insertion point prior to changing the landing distance then I could restore that point after changing the landing distance.
;;-------------------------------------------------------------------------------------------------(defun c:zld (/ e th dogleg doglegllength sf ss c mlss mlcount) (setqss (ssget (ssget "X" (list (cons 0 "MULTILEADER"))))DWATxtHgt (getvar "userr1")sf 1dogleg (/ 3 32.0)th (if dwatxthgt dwatxthgt dogleg)c 0mlcount 0mlss (ssadd)) (IF ss (while (< c (sslength ss)) (setq e (vlax-ename->vla-object (ssname ss c)) c (1+ c) ) (= (vla-get-ObjectName e) "AcDbMLeader") (progn;;change the dogleglength if
I have numerous text objects I want to rotate 180 while retaining each text objects insertion point. There's got to be an easy way to do this.
Long explanation: I created an annotation template to label pipe diameters on an imported shapefile. Everythings good, labels are parallel with lines, except for the fact that some labels are upside down. Is there an expression that would eliminate this? In my annotation template, my rotation expression equals the "angle" field of the object. My "quick and dirty" fix was to burst the annoation labels, and manually rotate necessary text, which wasn't a huge headache since I'm dealing with a relatively small number of labels, but in the future I might have hundreds of upside down labels.
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]....
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 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'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.
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.
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.
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.
My boss gave me a drawing to make some changes on a particular block; however, every time I try to insert the block, it always insert the block in Paper Space even though I'm in Model Space.
Is there any way to change that insertion point? I want to insert the block in Model not in PS...
The default Insertion Point of a part list is its" range box.maxpoint",but I need to make its "rangebox.minpoint" as its InsertionPoint . My code to insert the part list is as follows :
I have tried using the code " oPartsList.RangeBox.MinPoint.InsertionPoint = True" , imitating "oSketchLines(1).EndSketchPoint.InsertionPoint = True" ,but without luck .
In AutoCAD 2013, when I try to select a dimension object for moving, erasing, &c, the text disappears. How to get it to stay displayed? Seems to just be when using AutoCAD 2013.
How can I find a block with a specific name and get what the coordinates are? What we have is our Bill of Material is attributed blocks. I am attempting to change the first one. Well all of the lines that list the parts are seperate blocks with the same name. Now the Top Line of the Bill of Material is a different named block. If I can find the coordinates of this block I can then select the first line to do what I need to.
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
I've been using Frame Generator for at least 4 years and have not seen this issue before. Maybe I "bumped" a setting somewhere or a number changed in a default setting somehow, but lately when I insert a square tube frame piece into an assembly, it seems to be not accurate in it's placement.
Example: If I make a simple cube part that measures 28.0" wide and
Insert some frame generated square tubing on the edges of the cube, the frame measures 27.999999992 in - slightly off from where I inserted it. This seems to repeat without fail in every new assembly.
Inventor 2011 Professional (64 bit) HP 8710w laptop - 4gb ram, Intel Core 2 Duo - 2.5ghz Windows Vista Business
I have several existing block definitions and need to change the insertion point. Also, when creating a new block in the Block Editor, how do I define the insertion point?