+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Forum Newbie
    Using
    AutoCAD 2006
    Join Date
    Aug 2007
    Posts
    7

    Default Extrusion Direction z= -1 on Polylines

    Registered forum members do not see this ad.

    Hi, I have several dwg files that have polyline objects that have the following statement when using the list command:
    "Extrusion direction relative to UCS: X= 0.00 Y= 0.00 Z= -1.00"
    The elevation is 0 in the line properties.

    I'm using the dwg file as background in a another software and unfortunately it does not display the lines with the -1 value.

    I'm using the mirror3d (object) command around itself to do it manually in ACAD, is there any way to find all this polylines using VBA. I have tried to search the properties of polylines but could not find any extrusion directions.

  2. #2
    Senior Member kduck63's Avatar
    Using
    Map 3D 2012
    Join Date
    Jun 2007
    Location
    Naples, FL, USA
    Posts
    209

    Default

    It sounds like you are looking at the line(s) along the axis of the line itself. If you rotate the UCS around the X or Y axis 90 degrees you will see the true length of the line.

  3. #3
    Forum Newbie
    Using
    AutoCAD 2006
    Join Date
    Aug 2007
    Posts
    7

    Default

    Thx for reply,

    But the change of UCS does not change the result of the list command. And the line apears correctly in ACAD in UCS=world.

    I have attched an example.

    -kl
    Attached Files

  4. #4
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,183

    Default

    Extrusion Direction is the same a Normal. So, if using VBA then:

    varNormal = entLWPoly.Normal
    If varNormal(2) = -1 Then
    etc.

    If you want to find them from the Autocad screen then a filter set up as shown below will automatically select all polylines with normals not aligned to the positive Z axis.
    Attached Images

  5. #5
    Senior Member kduck63's Avatar
    Using
    Map 3D 2012
    Join Date
    Jun 2007
    Location
    Naples, FL, USA
    Posts
    209

    Default

    You can eliminate the z = -1 thing by making a bpoly, region or by UCS, NEW, Object.

  6. #6
    Forum Newbie
    Using
    AutoCAD 2006
    Join Date
    Aug 2007
    Posts
    7

    Default

    seant,
    Thanks, i didn't know about the filter command. Really nice feature. But I could not use -1 as a filter for the Z value, but I got around it using NOT.
    The VBA also works to get all relevant objects in the selection set. Now it's just to play around a bit with the mirror3d function (in VBA) to I get it right.

    Kduk63,
    Yes, when I played with the UCS i eliminated the z=-1 value, but as the external software is reading WCS it did not really helped. But thanks anyway.

    For your info the file is actually saved as a dwg by microstation, i think thats why I get the z=-1 value on some of the polylines.

    I'm in the learning phase of VBA in ACAD so I could need some help with the VBA equal to the mirror3d object (not by point)

    -kl
    Attached Images

  7. #7
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2014
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,183

    Default

    Quote Originally Posted by SaliKatt View Post
    seant,
    But I could not use -1 as a filter for the Z value, but I got around it using NOT.
    I couldn't either. I had to do the same but with != (not equal to).

    Specific questions about VBA are usually answered quickly by this site's numerous VB gurus.

  8. #8
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Jan 2010
    Location
    Kampen, Netherlands
    Posts
    10

    Default extrusion direction z=-1.0

    Registered forum members do not see this ad.

    I had to solve this problem in drawings coming from microstation/dgn format.
    A lot of arcs and polylines had this and couldn't be joined.
    I solved this problem with a simple Lisp routine.

    (defun c:swap()
    (setq f1 (ssget "_x" '((210 0.0 0.0 -1.0))))
    (if (/= f1 nil)
    (command "_mirror3d" f1 "" "xy" "0,0,0" "y")
    )
    (setq f1 nil)
    )

    Marco
    Last edited by macchi; 19th Jan 2011 at 01:06 pm.

Similar Threads

  1. need direction
    By mightyblue in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 21st Jun 2007, 09:13 pm
  2. Which Direction Next?
    By dadofmoos in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 8th Feb 2007, 04:28 am
  3. Need some direction!
    By Vuelta in forum AutoCAD Beginners' Area
    Replies: 5
    Last Post: 11th Aug 2006, 09:55 pm
  4. extrusion direction
    By Snipe in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 2nd May 2006, 06:13 pm
  5. extrusion
    By Tone in forum AutoCAD 3D Modelling & Rendering
    Replies: 5
    Last Post: 31st Mar 2005, 05:00 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts