AutoCAD 2010 :: Macros For Moving Text Based On Relative Coordinate
Oct 25, 2012
I am using AutoCad 2012, with CADDUCT. On my runs of duct that go vertical, I like to stack my tag numbers beside the riser in order, so our installers can easily identify the order without a ton of section views. I am trying to figure out a macro that will do numerous things. Since my tags come out at different rotation angles, I would like to do the following commands.
Rotate object text "TAG #" to 0 degrees
move object text "TAG #" to "Snap from" & "snap insert" 6" below the tag above it
I want the numbers to align by their insert locations up and down the page, and exactly 6" on center vertically from one another. The tag numbers have a node justified to the center up and down of the text.
I want to switch to relative coordinate input without using @. How is this done?
I have tried to change the settings in the Snap dialogue box, under Dynamic Input, where I have clicked on the Pointer Input, and the I have marked the Cartesian Format and the Relative coordinates.
Does relative coordinate entry work for multileaders? I would like to keep all of my leaders consistent and neat but other than using ost I cannot figure out a way to make them all line up. I would like to use coordinate entry if I could, maybe I am doing things in the wrong order?
I am using multiple objects to make larger more complex objects. As part of this I need a way to select a large group of objects and adjust their Z Order. For example, say I have a grid of 100 squares, 10 columns of 10 squares. I want to arrange them so the squares (rows) toward the bottom of the grid are in front (bring to front/bring forward) the squares that are higher up in the grid. Basically, every row should be further back in the Z order than the row below it.
Now you might say well for a grid this is simple just select every object/square in the row and move them forward or back as needed. But in my case they are not actually arranged in a neat grid, they are pretty randomly thrown together. But the requirement is still the same, I want to take all of the objects and arrange them so the objects that are closer to the bottom of the art board are further forward in the Z order than the objects above them. Basically think of the bottom of the artboard as being the front most row of the Z order and the top of the art board as the furthest back in the Z order. I use this type of configuration to give the perception of depth and form.
Below you can see an example of a cloud like graphic created using this technique by manually adjusting each individual object which takes forever on larger objects. I pick a point toward the bottom, and then I manually start adjusting Z order on each item until I get the effect I want. Having some way to pick a point on the art board and then arrange the objects above and below it on the Y axis by moving them forward or back in the Z order as needed would save me a ton of time. As you can see below, from about the 3rd or fourth row of squares from the bottom, I have brought those to the front, and each row above or below it has had it's Z order adjusted to give the impression of depth. Each consecutive row after the foreground row is progressively further back in the Z order. Any way to automate this so that I can atleast have a base to start with before I start doing my manual adjustments?
Is there a way to constrain a few objects to an attribute text box width? I want the background box and line to stretch, based on what is typed in that attribute box.
I know that if I make the attribute, a multi-line attribute, I can add a backgroud mask. I don't want to take this route, because the mask boundary varies, depending on what character is typed. Also, there is a gap between the mask and line I would like to maintain.
I tried some constraint stuff, but all I seem to be able to constrain is the insertion point of the text box, and not the width grip...
When moving the cursor over the drawing, it moves freely and the precision of the coordinates are still working to 4 decimal places. However, when I pick an object to move or copy and then try to move or copy it, the coordinate precision settings are changing to 0 decimal places and I'm unable to move things to exactly where I want - I can only move on a mm by mm basis. How do I return the precision settings of the coordinates back to 4 decimal places so I can move / copy objects without the current constraint I'm experiencing?
Is there a way to move the horizontal text of a vertical dimension that's outside of the extension lines to the right or left?
This was possible years ago with a simple stretch or moving of the text grip. Now, if the dimension is above the extension lines, the text is to the right. If it is below the extension lines, the text is to the left.
When I move or copy an object, it'll show the coordinate distance as you move your mouse. The issue is, the coordinate bounces between the nominal distance based on the units, such as 2' - 7 29/32". Then it will change to some extreme number, such as 2.784807E+01. My first assumption is that the mouse cursor is getting off alignment with the relative start location, or some extreme Object Snapping is going on (OSnap on/off still does the same thing).
I am using a script to move anchor points on a path that I have. When I move the anchors, the handles remain in the same location and I am getting very poor results. I was wondering if there was a way to move handles WITH the anchor points. Basically keep them relative to the anchors.
Below is how I am moving the anchor. I know that you can use leftDirection and rightDirection to move the handles, but I would like them to move the same way they would if you moved the anchors when selecting them in Illustrator.
Set currentPoint = targetPathItem.PathPoints(13) currentPoint.Anchor = Array(-1537.21, 2735.96)
Short of converting to an add-in is there any way to place macro's into toolbars where you can set the Text of the button to something other than the macro name?
I mean, while to those who write them, there's nothing wrong (really) with a command button titled Invoke_This_Fuction or InvokeFunction, it looks quite odd to everyone else.
If the only way is via add-in, that's fine (though a friendly display name should be an option). Just trying to find out before I spend a boatload of time only to figure out you can't
Also, do all add-ins 'have' to be installed? Or is there a way you can just drop a file in the correct path and it'll appear on next running of Inventor?
I work for graphics company who uses Corel heavily for all of our graphics work. We have custom built macros that were made to save our art into our database to then be accessed through Microsoft Access.
We've had these Macros running for many years and have never had any issues. Due to a mail server crash we moved to Office 365; a cloud based mail server. We then started updating our machines to Office 2010 to be able to use our new cloud based email locally.
The issue is once we upgraded to MS Office 2010 our macro stopped working and we cannot see where the issue is being caused. The weird thing is it's on both XP and Win7 machines.
We've uninstalled and re-installed Corel with no luck. I've changed permissions in Win7 and it has done nothing.
I am using autocad 2011. I am trying to attach a drawing as a xreg with a relative path. It keeps giving me relative path can not be assigned. I have tried saving the dwg. I have even started a new drawing and tried again but it keeps giving me the same error. All my drawing are in the same folder on a network drive. Another employee can open the drawing file from his computer and attach the same file fine. when He does it I can see the relative path. Is there a setting that I am missing?
I have Lightroom place images in folders on import according to date taken, e.g. 2011 -> 12 -> 31 -> 2011 12 31_001.jpg.
Since importing a lot of images, I have changed their metadata dates due timezone issues or camera dates set wrong. So a photo imported in 2011->12->31 actually now belongs in 2012->01->01. How do I get Lightroom to automatically go through my whole catalogue and move them? I don't mind if all my files get renamed. I though of removing them all from my catalogue and the re-imprting, but won't that lose all my edits?
Problem with lost Xref path when attaching a file using relative pathing? We are using Autocad 2010 and Windows 7. If we attach the same file using Windows XP the problem does not happen.
I’m trying to export from my drawing point X-Y position coordinates to Excel for use in programming a metrology that will measure at these locations.
When I use the EATTEXT command to pull up the data extraction wizard, it will export the positions & extracts the locations to a spreadsheet format. But coordinate numbers I get, seem to be relative to the World USC system & not the origin I align & set in the center.
Yet when I use ID Point, to check positions the coordinates of the points are correct & relative to the center origin. How to get the location coordinates relative to the center USC origin I've located in the center of my part?
Any variables that would cause my XREF paths to change from Full Path to Relative Path when I save a drawing?
This is something that just started happening recently and has me completely at a loss. I haven't installed any patches or hot fixes recently and nothing else has changed that I'm aware of.
I'm trying to finally utilize iLogic and all of its functionality (after using the basic features of inventor for the past 3 or so years) and I was wondering if there was a way to use iLogic (or some other feature for inventor) to resize text in a title block field of an IDW based on the length of the text entered (i.e. if the part's name was "Cam Retainer" the text height would be .12, but if its part name was "Spacer Cam Retainer Bushing" the text height would shrink down to .085 or something) so that it would still fit nicely into the text block?
I have a number of lines that will not fillet because they are non-coplaner. Is there a way to globally edit all the lines in a drawing to set the Z coordinate to zero rather than having to choose each line?
I have a .PTS file (an ASCII file with XYZ coordinate data + two additional sets of info per point). Is there any way to bring this into AutoCAD natively?
It strikes me that there should be an easy way to do this, but it eludes me at the moment. I've used "Connect to Data" to attach a .shp file export from another software, specifically a Windmill computer model. The geometry and data comes through, but the table contains no coordinates, which is what my vendor wants. The drawing overlay's georeference info very closely (within our tolerances) and the Coordinate System is set.
How to suck that coordinate info off the drawing without spending a week clicking on each of 8600 points and typing LIST?
1 How do I determine what coordinate system a drawing I have received has been prepared in?
2 I know how to export drawings to a .shp file but how can I export this drawing to a .shp file and ensure that coordinate system is maintained or otherwise changed for use in Arch GIS?
I have successfully exported the .shp file geometry previously but the cordinates system doesn't seem to match ARCGIS data sets. I am trying to establish is this an Autocad or ArchGis issue I suppose.
I received the attached drawing file "A" from a surveyor that was created in an earlier version of AutoCAD (approx 2000). The attached drawing is rotated so that the view in Model Space shows the cross-hairs with north pointing northwest. There are points included within the drawing that do not match the coordinates of the surveyed points within the attached ascii text file. I would like to rotate the drawing so that the points match the coordinates in the ascii file and North follows the y-axis.
I have imported the points from the ascii text file into a new drawing file "B". I external referenced (overlay) the new drawing file B into drawing A. I tried moving all of the objects in the drawing file A (with MOVE) to a known point coordinate and then rotating (ROTATE) the objects to two known points. I don't know how to select all of the objects in drawing A and not the external reference in drawing B so that I may Rotate only drawing A objects.
How to move and rotate the surveyors drawing A so that I may match the coordinates in the ascii text file.
I have a problem when I insert blocks who were originally saved as dxf.
For years I've been recieving dxf-drawings from our suppliers, and for years I've opened them, saved them as .dwg and then inserted them into my drawings. Lately, when I insert these blocks, they're scaled up by 25.4... It appears that AutoCAD converts them to inches instead of in mm.
When I check the scale of the block in "Properties", the insertionscale is always 1.
I've checked the "UNITS" in the dxf and the dwg, both are mm. I've checked "INSUNITS", "INSUNITSDEFSOURCE" and "INSUNITSDEFTARGET", all of them have value "4", which is "mm"...
The screenshot above is taken in the dxf-file. I've used the "DIST" command on the dimension which states "326", and as you can see, the distance measured is also 326...
The screenshot below is taken after I've saved the dxf as a dwg, and then inserted the dwg-file as block into a new drawing. The same dimension is measured, and then I get this:
Is there a way to set the “lineweight” to be Color-based automatically?
I’m wondering if there is a way to set the lineweight to be color-based such that all the objects have the same color will take the same lineweight automatically.
Sure, we can control such behavior through the “bylayer” feature but I’m not sure if this very particular behavior might exist in the AutoCAD; color-based lineweigth!
I have a drawing (attached) with the following settings: LTSCALE = 1, MSLTSCALE = 1, PSLTSCALE = 1.For some reason the linetype is not scaling based on the annotative scale. It will update correctly if I change the LTSCALE but for some reason it wants to ignore the MS and PSLTSCALE variables.
As a note, the drawing was converted from a Microstation drawing and the linetype is a converted Microstation linetype.Is there something in the linetype that is doing this.