Jump to content

Extrusion Direction z= -1 on Polylines


Recommended Posts

Posted

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.

Posted

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.

Posted

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

Drawing1.dwg

Posted

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.

Filter.jpg

Posted

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

Posted

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

FIlter.gif

Posted
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.

  • 3 years later...
Posted (edited)

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.:shock:

 

(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

Edited by macchi
  • Like 1
  • 12 years later...
Posted

Thanks macchi! Your Lisp routine fixed mirrored text when importing DXFs into 3rd party CAD software.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...