How to replace a line segment?

Here's what I want to do:
Take the selected line segment, and replace it with a series of line segments, scaled to the length of the line.
I'm not quite sure how to go about this.  I don't see any line object relating to a path item.  All I see are anchors.  I know I can access the two anchors of the line segment that's selected, but to begin with, how to I delete the line connecting the anchors?

Here's an image to help illustrate.  The object on the left has a line segment selected.  The script runs and removes the segment, then replaces it with the door path, scaled up to the correct width to fit:

Similar Messages

  • How to replace a line ina text file using java?

    Hi ALL,
    Does anybody know how to replace a line in a text file uisng java.

    use this thing:
    http://doesthatevencompile.com/current-projects/code-sniplets/ASCIIFile.htm
    open the file,
    read its contents, replace the text you need in the contents, set the contents back into the file.
    it takes care of the IO for you.

  • How to replace a line in file Java

    Hi,
    I want to replace a line in file sequencial.
    I read file, but i don't know how to replace one line..
    Thanks...

    I supose this..
    I usea a FileReader and BufferedReader to read a file.
    I read a line, I know the number of the line, but how to say to method println o write what it's the line to replace?

  • How to make default line segment

    is there a way to limit the length of a line segment stay a default length instead of it getting longer as you drag your mouse ? For example in a program called ChemBioDraw you can limit the default length for drawing molecules

    No.
    You could creae a graphic style that converts an object to rectangle of width X and height 0, then add a rotation effect to get the rotation of the line how you want it, then expand to edit further. This seems like more work than you want and would be very counterintuitive for anyone working on the file.

  • How to join multiple line segments to make a fillable polygon

    Howdy,
    I have illustrator CS2 12.0.1. Is there any easy way to create an irregular shaped fillable polygon? The way I currently do this is (1) I use the line segment tool to draw the sides of the polygon, (2) then for each corner of the polygon, I use the direction selection tool to select the corner, then do command-J to "join" the two segments that touch that corner. Only after doing that, I am finally able to use the eyedropper tool to fill the polygon.
    This take a lot of tedious effort. I have LOTS of polygons to draw. Once I have drawn the segments, it seems like I should just be able to select all the segments and have an option that does all the joins at once.
    Or, maybe instead of the line segment tool I could use some path tool. But whenever I have tried that, I end up with curved segments instead of straight ones.
    Can anyone tell me how to do this?
    Thanks for any help,
    Frank B

    Basically I am drawing on top of a bitmapped background which is a satellite map. My polygons are essentially the property lots on this map. So I visually see where the corners are, and I want to make a polygon that I can fill. I actually will fill with a few different translucent colors to indicate different types of lots. This all works fine except that my current means of drawing the polygons is tedious, and it seems like there should be a better way.
    Another way I could solve my problem is if I were able to reshape an existing polygon by dragging its corners to where I wanted them to be. I have not figured out how to do that. Either the entire polygon moves when I drag a corner, or the polygon gets reshaped by the drag in a way I don't want (what I want is to move one corner, and what I get instead seems like one corner stays put and the other three move around to keep constant skewishness; or something).
    Frank

  • How to replace a line in a csv file

    Hi everyone,
    What i need to do is to write into a csv file, line by line. When I'm in the line #1000, I need to go back to line #1 and replace the old line by a new line.
    I only found a way to do this but I don't think it's a good way.
    I read the actual file, I put it in an array (with spreadsheet string to array), I replace the text in the specific index of the array, I delete the old file and I convert the array to a spreadsheet string and then write it in a new file. It's strange but it works. Is there any other (smarter) way to do this?
    Thank you
    Stéphanie

    Peachy wrote:
    Unfortunatly, I can't have the same length on every line. I don't know what's going to be witten in the text.
    Unfortunately, in this case you cannot really do what you want. Whenever you replace a line, all bytes to the right need to be shifted up or down to account for the change in length. A file is just a long sequence of bytes and a line break is just the presence of a newline character. There is no concept of "lines" per se.
    LabVIEW Champion . Do more with less code and in less time .

  • How to create curved line segments in PE v. 4?

    Specifically, I want to superimpose curved lines onto a scanned drawing. Thanks in advance.

    Tony,
    Unfortunately PSE does not have the best drawing tools, but here is way to draw a curve:
    1. Create a new layer.
    2. Draw an oval with the Elliptical Marquee tool.
    3. Edit>Stroke the oval, then erase portions of the oval leaving just the curve.
    4. To fine-tune the shape, activate the Move tool and drag the various handles.

  • AutoCAD drawings INTO Illustrator / How can I join line segments?

    Good day;
    ~ using Illustrator 5
    ~ importing technical drawings from CAD (think, complex mining shafts / exploded drawings and the like...)
    ~ want to manipulate imagery in Illustrator
    ~ all drawings are importing as individual lines / shape....a simple rectangle is four separate lines
    ~ is there an efficient way to "OPEN' or to "IMPORT" these complex drawings and have the CAD lines unite as closed shapes?!
    ~ isolating each shape / selecting nodes / 'joining' / is just NOT the best way to kill my day
    ~ willing to download solid recommended plug-ins
    S.O.S.!!
    Thank you in advance,
    Laura

    Laura,
    Here is a thread for FrameMaker users that has some data you might find useful in doing what you want: http://forums.adobe.com/thread/316489
    I have to handle this headache on occasion with MicroStation DGN files and I don't know of any plug-ins that will do this for either DWG or DGN. I try to get an EPS export from the CAD program first, if that export option is available, and bring it into Adobe Illustrator. This should be a standard for any CAD software. The next thing I try is PDF export and bring that into AI. If that doesn't work...
    Your next problem is that version 5 of Illustrator is 17 years old! I'm sorry to inform you but that could be the problem you face, your software and computer are too old and that version of Illustrator isn't sophisticated enough to handle what you want to handle. You may have no option but to get a newer Mac or Windows computer and get a newer version of AI, at least!
    I run Windows XP on a Dell Dimension 5150 and AI CS4 at work and I can barely get by at home with a 4 year old Mac Mini running Mac OS X 10.5 and AI CS2. That should give you a baseline to work from.
    I hope this last hasn't upset you too much.

  • SDO_AGGR_UNION of polygons result a geometry with a line segment inside?

    Hi,
    I am struggling with a problem, I cannot find the reason.
    I have 3 polygons in Oracle Spatial 11g (Enterprise Edition Release 11.1.0.7.0 - 64bit Production):
    All three are simple polygons: SDO_GEOMETRY(2003, null, null, (1,1003,1), (... coord array...) )
    They are valid as the result of an SDO_MIGRATE.TO_CURRENT and a VALIDATE_GEOMETRY_WITH_CONTEXT
    SELECT SDO_AGGR_UNION(SDOAGGRTYPE(GEOM, 5E-1)) FROM ....
    result a collection geometry with elem_info_array (1,2,1, 5,1003,1)
    I cannot understand, how can this happen. Unioning the three separate polygons should result a simple polygon (if they were touching/overlapping) or a multipolygon with 2 or 3 rings.
    But the unionig how can result a line segment of two points??
    I have double-checked the polygons and the tolerance values also.
    Have you any idea?
    Thanks is advance
    Regards,
    Tamas

    They're some crazy looking geometries you've got there! I got a geometry back from your query using 11.1.0.6 on Windows XP, but its a useless geometry. I wouldn't expect Oracle Spatial to come back with a sensible geometry at the end of this anyway. You've got a mix of lots of different geometry types.
    SQL> select t.geometry.sdo_gtype, count(*)
      2  from test_geomunion t
      3  group by t.geometry.sdo_gtype
      4  order by 1;
    GEOMETRY.SDO_GTYPE   COUNT(*)
                  2001        355
                  2002        499
                  2003       1649
                  2004         11
                  2006          2
                  2007         21What result would you expect from the sdo_aggr_union query? i.e. what purpose would unioning all these together serve?
    I would more usually use sdo_aggr_union to put merge a few contiguous polygons together. Unioning points, lines and polygons together doesn't make sense to me.

  • How to Replace Line feed

    Hi All,
            i want to replace a line feed which is shown as ## in debug mode with space..
    Though i have tried replacing it by giving hexadecimal value of # but still its not gettign replaced.
    So how do i replace these occurences of line feed in the string which i am using..
    Regards,
    Syed

    Hi try this way :
    data: value type string....
    data: lv_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.
    replace all occurrences of lv_feed in value with space.

  • How can I make the line segment tool repeat several times?

    How can I make the line segment tool repeat several times?

    If this is what you want, hold the ~ key on your keyboard while dragging with the tool.
    If you want spaced copies of the completed line, use the Transform Effects from the Effects menu.

  • How do you connect two line segments in illustrator cs6?

    I have been using adobe cs5 for a few years.  If I wanted to connect the corners of two line segments, you would select the first line segment with the select tool, then switch to the direct selection tool, and drag the anchor point to the other line segment anchor point till the cursor arrow went white (signifying the other anchor point being recognized).  Then you would choose "join" and it would give a nice right angle connecting the two line segments. 
    With adobe cs6, the direct selection tool doesn't change to white when you go over the other line segment anchor point.  Why is this? 
    (Unfortunately my screen capture doesn't show the black arrowhead that you see when you are dragging with the direct selection tool to the other line segment.)
    I have also attached a youtube video link that shows what how this recognition of anchor points looks in adobe illustrator cs5, and this was exactly what I used to do when I was performing the task shown in my screen capture but with adobe illustrator cs5.  Thanks and sorry for the essay!
    https://www.youtube.com/watch?v=InwcicWQHL0
    Anybody have any idea how to remedy the lack of anchor point recognition?

    You are welcome, zinders.
    Just a comment: you seem to use Butt Cap, so you can really see when line segments are not joined.

  • How to make line segments persist

    I am studying by myself, and I have already Googled the subject line, to no avail.
    I am trying to write lines with movement dictated by the arrow keys. I can get a line segment to move, but after the movement the whole panel gets repainted. So I don't get any lines written anywhere.
    Anyone have a solution to this?
    Here's my code.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class DrawLinesUsingKeys extends JFrame {
        private DisplayCoordinatePanelSEVEN keyboardPanel =
                new DisplayCoordinatePanelSEVEN();
        public DrawLinesUsingKeys() {
            getContentPane().add(keyboardPanel);
            keyboardPanel.setFocusable(true);
        /**Main method*/
        public static void main(String[] args) {
            // Create a frame
            DrawLinesUsingKeys frame = new DrawLinesUsingKeys();
            frame.setTitle("Draw Lines Using Keys");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(300, 300);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    class DisplayCoordinatePanelSEVEN extends JPanel implements KeyListener {
        private boolean pressedAction = false;
        private int x = 150;
        private int y = 150;
        private int z = 150;
        private int a = 150;
        public DisplayCoordinatePanelSEVEN() {
            addKeyListener(this);
        public void keyPressed(KeyEvent e) {
            pressedAction = true;
            switch (e.getKeyCode()) {
                case KeyEvent.VK_DOWN:
                    a = y + 10;
                    break;
                case KeyEvent.VK_UP:
                    a = y - 10;
                    break;
                case KeyEvent.VK_LEFT:
                    z = x - 10;
                    break;
                case KeyEvent.VK_RIGHT:
                    z = x + 10;
            repaint();
        public void keyReleased(KeyEvent e) {
        public void keyTyped(KeyEvent e) {
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.setColor(Color.BLACK);
            if (pressedAction) {
                g.drawLine(x, y, z, a);
                pressedAction = false;
                x = z;
                y = a;
        }Thank you for your time.

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class DrawLinesUsingKeys extends JFrame {
        private DisplayCoordinatePanelSEVEN keyboardPanel =
                new DisplayCoordinatePanelSEVEN();
        public DrawLinesUsingKeys() {
            getContentPane().add(keyboardPanel);
            keyboardPanel.setFocusable(true);
        public static void main(String[] args) {
            DrawLinesUsingKeys frame = new DrawLinesUsingKeys();
            frame.setTitle("Draw Lines Using Keys");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(300, 300);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    class DisplayCoordinatePanelSEVEN extends JPanel implements KeyListener {
        java.util.List<Point> points = new java.util.ArrayList<Point>();
        private boolean pressedAction = false;
        private int x = 150;
        private int y = 150;
        private int z = 150;
        private int a = 150;
        public DisplayCoordinatePanelSEVEN() {
            addKeyListener(this);
            points.add(new Point(x,y));
        public void keyPressed(KeyEvent e) {
            pressedAction = true;
            switch (e.getKeyCode()) {
                case KeyEvent.VK_DOWN:
                    //a = y + 10;
                    y += 10;
                    points.add(new Point(x,y));
                    break;
                case KeyEvent.VK_UP:
                    //a = y - 10;
                    y -= 10;
                    points.add(new Point(x,y));
                    break;
                case KeyEvent.VK_LEFT:
                    //z = x - 10;
                    x -= 10;
                    points.add(new Point(x,y));
                    break;
                case KeyEvent.VK_RIGHT:
                    //z = x + 10;
                    x += 10;
                    points.add(new Point(x,y));
            repaint();
        public void keyReleased(KeyEvent e) {
        public void keyTyped(KeyEvent e) {
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.setColor(Color.BLACK);
            if (pressedAction) {
                for(int xx = 0, yy = points.size()-1; xx < yy; xx++)
                  Point p1 = points.get(xx);
                  Point p2 = points.get(xx+1);
                  g.drawLine(p1.x, p1.y, p2.x, p2.y);
                pressedAction = false;
                //x = z;
                //y = a;
    }

  • How to fill an object made with line segment?

    I made some objects with the line segment tool, but i cant seem to fill them. Not even when i group the lines and try to fill after.
    Anybody an idea? thanks

    Live paint will do the trick you select the lines and click on the live paint bucket tool which will make the lines a part of live paint group, there are options for controlling the gap distance.
    Then select a color and click the live paint tool somewhere in the area that the lines are used to define. it will fill with that color.n CS 2 and 3 I think well CS3 for sure.

  • How to copy a diagonal line segment?

    If I do Transform, Move, 40 40 40 0 Copy it seems to just make another line segment on top of the one I already have.
    I want to copy it down and to the right continually pressing CTRL+D.
    I think I am making a simple mistake since I have done this before.
    Thanks!

    Focused,
    Down and to the right moving 40 both ways should be just 40 (Horizontal) and  -40 (Vertical), then Copy.
    Ctrl+D to repeat copying down and to the right.

Maybe you are looking for

  • Reading an XML file from a package .....

    I m trying to read an xml file from a package. The XML file is located on desktop (not on unix system). if i mention the path of the file in a package, is it sufficient ???. OR do i need to CREATE DIRECTORY in oracle and mention the file path in this

  • Wait while loading

    Hello All,      I created a BSP Application and the output is shown on a table view. But while execution it's taking quite amount of time. Finally the output will be displayed. But during this period the page footer says "DONE". So it leaves a impres

  • NOKIA 6020 Background

    Good day Sir/Madam I own a Nokia 6020 phone. Is there a way to change the background that is displayed behind menus, looking like circles? Is it possible to turn it off? Thank you for your time. Andrew Boiu.

  • Error: File could not be opened.

    When managing the following and clicking on "Export To Excel", the following error occurs: "Error: File could not be opened." The same error occurs when doing the following: - Trying to export Control Tables - Trying to export Import Formats - Trying

  • Anyone else getting a quick video flicker when swiping sideways

    when I swipe sideways with 3 fingers (to switch from dashboard to multi windo page to full screen pages, the multiwindow page flickers/flashes briefy and windows come to front that were not in front before....