xdata and arcs...

Discussion in 'AutoCAD' started by Devronious, Sep 17, 2004.

  1. Devronious

    Devronious Guest

    I'm using vla-offset and it does offset, but xdata doesn't stay with arcs,
    only lines when I do this.

    Anybody know why?

    Thanks,

    Devin
     
    Devronious, Sep 17, 2004
    #1
  2. Devronious

    Big 'D' Guest

    Devin,
    I am really new to xdata and am not sure why it is not remaining on the offset arcs. I can suggest a work around if you do not find the solution. Of course, you can copy and paste without loosing xdata. You can also highlight the entities (no active command) hold the right mouse button down and move your mouse to a new position. When you let up on the right mouse button you will have some options on what to do. You can place as block then explode the block and your xdata will remain.
    If you get a chance and are used to working with lisp and xdata, check my post from this morning titled "Select specific data - HELP!" By Big D and see if you can offer some help.
    Thanks,
    D
     
    Big 'D', Sep 17, 2004
    #2
  3. Devronious

    John Uhden Guest

    That IS odd.
    I guess your approach might be to CopyObjects and change the radius...

    (defun ArcOffset (Object Dist / Doc Radius Owner Copy)
    ;; Uhden attempt to retain xdata when offsetting an arc
    ;; via ActiveX methods.
    ;; Note: Needs more error control, e.g. locked layers.
    (and
    (vl-load-com)
    (cond
    ((= (type Object) 'VLA-Object))
    ((= (type Object) 'ENAME)
    (setq Object (vlax-ename->vla-object Object))
    )
    (1 (prompt " Invalid object."))
    )
    (or
    (= (vla-get-ObjectName Object) "AcDbArc")
    (prompt " Object is not an arc.")
    )
    (or
    (numberp Dist)
    (prompt " Invalid distance.")
    )
    (setq Radius (vla-get-radius Object))
    (or
    (> (setq Radius (+ Radius Dist)) 0)
    (prompt " Radius would be <= 0.")
    )
    (setq Doc (vla-get-ActiveDocument (vlax-get-acad-object)))
    (setq Owner (vla-ObjectIdtoObject Doc (vla-get-OwnerID Object)))
    (setq Copy (vlax-invoke Doc 'CopyObjects (list Object) Owner))
    (not (vla-put-radius (car Copy) Radius))
    )
    )
     
    John Uhden, Sep 19, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.