• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Contributor
    Posts: 19
    Registered: ‎10-08-2003

    copy/entmake pline w/o xdata?

    148 Views, 11 Replies
    02-15-2006 10:09 PM
    How is the best way to go about this?
    I have a ton of polylines I have to copy to another layer. Problem is these polylines have xdata linked to a db, which is linked to text in the drawing. When copied they create another entry in the db & another linked text entity.
    My first attempt was a routine that would copy a pline, then unlink it (asset explode), than move it to another layer. That 's no good because of the multiple db entry & entlast gets the text not the pline.
    I don't know much about entmake. Can I use it to create an identical pline w/o the xdata? Or is there another way?
    Any & all help is appreciated.
    Please use plain text.
    Distinguished Contributor
    Posts: 285
    Registered: ‎01-08-2004

    Re: copy/entmake pline w/o xdata?

    02-16-2006 12:09 AM in reply to: Kevin_Van
    Kevin,

    If I understand your problem correctly - it sounds like (setq new_obj (vla-Copy existing_obj)) would be the way to go. This avoids using a command call. Entmake will work as well (on LWPolylines) - but it's not as simple. As far as I can tell, entmake will not copy the xdata with it - vba-Copy will.

    Once you have your new_obj - you can make your changes to the xdata as needed.

    Peter
    Please use plain text.
    Contributor
    Posts: 19
    Registered: ‎10-08-2003

    Re: copy/entmake pline w/o xdata?

    02-16-2006 03:47 AM in reply to: Kevin_Van
    Hey Peter,
    Thanks. I'll try the vla-copy as you discribe.
    There is no need to change the new_obj xdata. The key is when the new_obj is created it doesn't have any of the original's xdata which would go into the db.
    Please use plain text.
    *Tony Tanzillo

    Re: copy/entmake pline w/o xdata?

    09-19-2007 12:54 PM in reply to: Kevin_Van
    >> I don't know much about entmake. Can I use it to create an
    >> identical pline w/o the xdata? Or is there another way?

    Don't use (entmake) to copy something. Doing that can easily
    result in changing properties whose values are set to 'BYLAYER',
    to the current ediitor settings.

    You can read more about the perils of using (entmake) to copy
    entities by reading this newsgroup.

    How to do that depends on how (and when) the database records
    are being created. Does it happen when you copy the objects or
    at some later point? Is there a custom application managing the
    data links?

    --
    http://www.caddzone.com

    AcadXTabs: MDI Document Tabs for AutoCAD 2008
    Supporting AutoCAD 2000 through 2008
    http://www.acadxtabs.com

    wrote in message news:5087790@discussion.autodesk.com...
    How is the best way to go about this?
    I have a ton of polylines I have to copy to another layer. Problem is these polylines have xdata linked to a db, which is linked to text in the drawing. When copied they create another entry in the db & another linked text entity.
    My first attempt was a routine that would copy a pline, then unlink it (asset explode), than move it to another layer. That 's no good because of the multiple db entry & entlast gets the text not the pline.
    Any & all help is appreciated.
    Please use plain text.
    *Ken Krupa

    Re: copy/entmake pline w/o xdata?

    09-19-2007 02:02 PM in reply to: Kevin_Van
    I'm curious as to why I see Tony's reply in my News reader (Thunderbird,
    but also with OE), but I never got the original message that was being
    replied to. I've seen this a few other time recently also. What's going
    on? Is there activity on the web interface that's not making it to the
    Newsgroup?
    Please use plain text.
    *Gordon Stephens

    Re: copy/entmake pline w/o xdata?

    09-20-2007 05:07 AM in reply to: Kevin_Van
    Hmmmm . . . same for me! Odd.
    --
    Gordon.


    "Ken Krupa" wrote in message
    news:5726465@discussion.autodesk.com...
    I'm curious as to why I see Tony's reply in my News reader (Thunderbird,
    but also with OE), but I never got the original message that was being
    replied to. I've seen this a few other time recently also. What's going
    on? Is there activity on the web interface that's not making it to the
    Newsgroup?
    Please use plain text.
    *Jason Piercey

    Re: copy/entmake pline w/o xdata?

    09-20-2007 06:04 AM in reply to: Kevin_Van
    The original post was from February of 2006. You'll
    have to download all the headers from that time period
    before you will see the original message.


    --
    Autodesk Discussion Group Facilitator


    "Ken Krupa" wrote in message
    news:5726465@discussion.autodesk.com...
    I'm curious as to why I see Tony's reply in my News reader (Thunderbird,
    but also with OE), but I never got the original message that was being
    replied to. I've seen this a few other time recently also. What's going
    on? Is there activity on the web interface that's not making it to the
    Newsgroup?
    Please use plain text.
    *Ken Krupa

    Re: copy/entmake pline w/o xdata?

    09-20-2007 07:27 AM in reply to: Kevin_Van
    OK, that explains it. Thanks.

    Jason Piercey wrote:
    > The original post was from February of 2006. You'll
    > have to download all the headers from that time period
    > before you will see the original message.
    >
    >
    Please use plain text.
    *Martin Shoemaker

    Re: copy/entmake pline w/o xdata?

    09-22-2007 09:29 AM in reply to: Kevin_Van
    I wish it was easier to do that. Autodesk has things throttled to the
    point that I seldom can download all headers in a newsgroup to a new
    computer or after they "reorganize" a group -- it takes approximately
    forever (up to 20 minutes for the larger groups), and the header
    download generally times out (I have a 12M cable connection for
    internet). I don't understand the logic behind their decision. Surely
    Autodesk can afford decent servers and enough bandwidth.

    Martin

    Jason Piercey wrote:
    > The original post was from February of 2006. You'll
    > have to download all the headers from that time period
    > before you will see the original message.
    >
    >
    Please use plain text.
    *Jeff Mishler

    Re: copy/entmake pline w/o xdata?

    09-22-2007 11:35 AM in reply to: Kevin_Van
    I don't think it's the servers or the bandwidth that is at fault here. I
    think it lies in the software they are using to make these groups accessible
    from both nntp & http.

    Yes, I got a new PC last week and let it spent a good porton of last weekend
    downloading the headers. Although, this time it only timed out 2 or 3 times.
    The last time I did it, it timed out every 15k-20k headers.

    Guess this is the one good thing about getting new PC's evry 3-4 years :-(


    "Martin Shoemaker" wrote in message
    news:5729206@discussion.autodesk.com...
    I wish it was easier to do that. Autodesk has things throttled to the
    point that I seldom can download all headers in a newsgroup to a new
    computer or after they "reorganize" a group -- it takes approximately
    forever (up to 20 minutes for the larger groups), and the header
    download generally times out (I have a 12M cable connection for
    internet). I don't understand the logic behind their decision. Surely
    Autodesk can afford decent servers and enough bandwidth.

    Martin

    Jason Piercey wrote:
    > The original post was from February of 2006. You'll
    > have to download all the headers from that time period
    > before you will see the original message.
    >
    >
    Please use plain text.