Author Topic: 3DFace DXF code (60 . 1) ...  (Read 6277 times)

0 Members and 1 Guest are viewing this topic.

Hangman

  • Swamp Rat
  • Posts: 566
3DFace DXF code (60 . 1) ...
« on: May 04, 2010, 06:55:28 PM »
Can someone tell me what the DXF code (60 . 1) in a 3DFace object is ??

I was running a routine to change all 3DFace objects to PLines, and came across a 3DFace that crashed my routine.  When I went to find it using QSELECT, it wouldn't select it.  So I went in using code like so:
Code: [Select]
(setq Lines (ssget "_X" (list (cons 0 "3DFACE") (cons 410 "Model"))))

Then went through each piece (there were only eight) individually and found these.
The first six were like this one:
Quote
Command: (setq b (entget a))
((-1 . <Entity name: 7dc55520>) (0 . "3DFACE") (330 . <Entity name: 7e0199c0>)
(5 . "745C") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"SV-MONS-E-SYM") (100 . "AcDbFace") (10 136849.0 50591.9 1.52776e-013) (11
136853.0 50591.5 1.52776e-013) (12 136852.0 50588.2 1.52776e-013) (13 136849.0
50588.5 1.52776e-013) (70 . 0))

The last two were like this one:
Quote
Command: (setq h (entget a))
((-1 . <Entity name: 7dc5e708>) (0 . "3DFACE") (330 . <Entity name: 7e0199c0>)
(5 . "5611") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"SF-BLDG-E-LIN") (60 . 1) (100 . "AcDbFace") (10 136776.0 50668.2 0.0) (11
136777.0 50692.4 0.0) (12 136817.0 50690.2 0.0) (13 136816.0 50665.8 0.0) (70 .
0))

The only thing I've been able to find regarding the DXF code 60 is "16 bit integer".

Thanks for you help.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #1 on: May 04, 2010, 07:00:50 PM »
Group code 60 is visibility in all entities, 1 indicates the entity is invisible.

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #2 on: May 04, 2010, 07:12:40 PM »
Group code 60 is visibility in all entities, 1 indicates the entity is invisible.

Really ?!.  This drawing is a Microstation saved to dwg, I didn't know they had the ability to make objects invisible.
So, some questions regarding this then:
How would an object be made invisible ??  <edited> I guess I should mention, 'in autocad'.
How would an object be made visible ??
Can these two questions be answered by both using code and not using code ??  Another words, is there some pulldown menu with a command to make an object invisible ??

I was tempted to modify my routine to just delete them, but if they're invisible, they may have some value to the drawing so I hadn't better do that, but I didn't know one could make things visible and invisible.  Can you teach me about it or point me in a direction to read up on, I have a need for something like this.

Thanks.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #3 on: May 04, 2010, 07:18:39 PM »
Perhaps take a look at these:

Code: [Select]
(defun c:AllVis ( / tmp )
  ;; Lee Mac  ~  27.04.10
 
  (if (setq tmp (ssget "_X"))
   
    ( (lambda ( i / e )
        (while (setq e (ssname tmp (setq i (1+ i))))
          (Update
            (PutDXF 60 0 (entget e))
          )
        )
      )
      -1
    )
  )

  (princ)
)

(defun c:Invis ( / tmp )
  ;; Lee Mac  ~  27.04.10

  (if (setq tmp (ssget "_:L"))

    ( (lambda ( i / e )
        (while (setq e (ssname tmp (setq i (1+ i))))
          (Update
            (PutDXF 60 1 (entget e))
          )
        )
      )
      -1
    )
  )

  (princ)
)

(defun PutDXF ( code value elist )
  (entmod
    (if (assoc code elist)
      (subst (cons code value) (assoc code elist) elist)
      (append elist (list (cons code value)))
    )
  )
)

(defun Update ( elist )
  (entupd (cdr (assoc -1 elist)))
)

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #4 on: May 04, 2010, 07:27:38 PM »
Perhaps take a look at these:
 ...

Geez Lee, you didn't just spit these out did you ??
Quote
 ;; Lee Mac  ~  27.04.10

  ...   No, it was a few days ago, ... phew.

:cool:

Thank you Lee.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

T.Willey

  • Needs a day job
  • Posts: 5251
Re: 3DFace DXF code (60 . 1) ...
« Reply #5 on: May 04, 2010, 07:36:23 PM »
Hope your code takes into account that 3d faces can have the two parallel lines shown, and the others hidden.  I did a code like the one you are talking about a long time ago, but I did it with lines because of that reason.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #6 on: May 04, 2010, 07:45:56 PM »
Perhaps take a look at these:
 ...

Geez Lee, you didn't just spit these out did you ??
Quote
 ;; Lee Mac  ~  27.04.10

Nah, spat them out a few days ago  :lol:

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #7 on: May 04, 2010, 07:47:55 PM »
Hope your code takes into account that 3d faces can have the two parallel lines shown, and the others hidden.  I did a code like the one you are talking about a long time ago, but I did it with lines because of that reason.

Uhhh, ...  No.  I didn't know you could do that with 3DFace objects.  Wow, talk about opening a can, I'm learn'n all kinds of new stuff with this post.
So how can these objects become invisible, or partially invisible ??  Obviously from what you and Lee have said, there must be a way to manipulate each face of a 3D Face object, and appearently make the whole thing invisible.  But how would a user do it ??  There has to some other way besides just using code to manipulate it.  Or is it a long drawn out process and that is why the lack of comments regarding the manipulation is being made ??

Actually, perhaps my code does take into account a partial invisible object, I simply get the four corners (10, 11, 12, 13) and draw a rectangle, then delete the 3D face.  Could I be possibly causing more problems than I'm worth doing it this way ??

Thank you all for you input and help with this ... interesting find of mine.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #8 on: May 04, 2010, 07:54:17 PM »
OK, I've gotta run for the evening, but before I go, can I ask a favor ??

Does anyone have a quick way I can get these two 3DFace objects visible so my user can keep going ??
I'm going to try and put some code together tonight using Lee's examples, but I'm not fluent enough with some of the items there to make this happen by tomorrow morning.

thanks.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #9 on: May 04, 2010, 09:28:39 PM »
set the splframe system variable to 1 and then do a regen
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #10 on: May 05, 2010, 10:43:06 AM »
set the splframe system variable to 1 and then do a regen
Thanks Michael for your help.
My 'splframe' variable was at zero, so I set it to 1 and did the regen, but the two entities are still not visible.

We're cross checking the drawing with the original microstation dgn file to see if they are needed.  Worse case scenario we will just delete these two and redraw them in autocad.  I'm a little worried though, we have a boat load of drawings to go through and I'm sure we will be running into this more and more.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #11 on: May 05, 2010, 10:50:50 AM »
Sorry, I was thinking the edges were "normally" hidden, not via the invisibility flag. For the latter I'd just walk thru all 3D faces and ensure each edge was not invisible via the 60 group.

Quick and Dirty / Coded blind (hope there's no errors):

Code: [Select]
(if (setq ss (ssget "x" '((0 . "3dface")(60 . 1))))
    (repeat (setq i (sslength ss))
        (entmod
            (subst
               '(60 . 0)
               '(60 . 1)
                (entget (ssname ss (setq i (1- i))))
            )
        )
    )    
)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #12 on: May 05, 2010, 11:10:12 AM »
Perhaps take a look at these:
 ...

LEE, ...  I just want to say Thank you again for posting that code.  You've posted pieces of this before and I've looked them over plenty of times, but I never made any connection to what was happening until you posted this set here.  I have finally comprehended them.  I'm still puzzled as to the ( (lambda ( ... , but I basically understand it's purpose.  I've read a post by ... either CAB or MP regarding an excellent explanation into the use of Lambda without 'mapcar, but I have not been able to wrap my brain around either of them yet.  If I remember, you asked the question as to how and why he was not using 'mapcar.
Anyway, I ran it on a whim and it errored on me, so I figured I needed to put some other code into it, but from the looks of what you posted, it should work as is.
Code: [Select]
Command: allvis
; error: bad argument type: lentityp nil
There is a variable coming up empty somewhere, so I need to play with it more.


Michael, You are AWESOME !!   THANK YOU, it gave me my two invisible elements, and they WERE needed in the drawing.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

T.Willey

  • Needs a day job
  • Posts: 5251
Re: 3DFace DXF code (60 . 1) ...
« Reply #13 on: May 05, 2010, 11:13:26 AM »
If you look in the help, you will see that dxf code 70 pertains to invisible edges.

Quote
70
 Invisible edge flags (optional; default = 0):

1 = First edge is invisible

2 = Second edge is invisible

4 = Third edge is invisible

8 = Fourth edge is invisible
 
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #14 on: May 05, 2010, 11:16:16 AM »
Hangman, just to be clear -- any of the guys who responded in this thread could have posted what I did in my last post. I think they were trying to teach you to fish instead of giving you the fish, usually the better route -- I just grew weary seeing you twist in the wind. Also, make note of Tim's post, salient info there -- generally speaking it's not "normal" to hide objects via the 60 group, though many of us here may do it.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #15 on: May 05, 2010, 11:30:21 AM »
LEE, ...  I just want to say Thank you again for posting that code.  You've posted pieces of this before and I've looked them over plenty of times, but I never made any connection to what was happening until you posted this set here.  I have finally comprehended them.  I'm still puzzled as to the ( (lambda ( ... , but I basically understand it's purpose.  I've read a post by ... either CAB or MP regarding an excellent explanation into the use of Lambda without 'mapcar, but I have not been able to wrap my brain around either of them yet.  If I remember, you asked the question as to how and why he was not using 'mapcar.
Anyway, I ran it on a whim and it errored on me, so I figured I needed to put some other code into it, but from the looks of what you posted, it should work as is.
Code: [Select]
Command: allvis
; error: bad argument type: lentityp nil
There is a variable coming up empty somewhere, so I need to play with it more

Thanks Hangman - I tried to post the code in a more general sense - providing sub functions that you could use for other DXF values/situations, not just in this instance.

But that said, they should work straight off - I cannot seem to get them to error anyway.  :|

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #16 on: May 05, 2010, 11:54:10 AM »
Well MP, I appreciate the help.  And I appreciate those who have helped here, and those who are helping me to fish rather than just be fed, I am really learning a lot.  I was starting to panic a bit, I didn't want to delete the invisible items, but I didn't know another way either and I didn't have the time to learn it properly.  Now that its over, I can take the time to learn it properly, there's a lot there to be learned.  One of my biggest hurdles is time.  I don't get much to learn this coding, perhaps a half hour during lunch, an hour or so after work, in between the family and other responsibilities.  So when I get to read-up on some subject - but don't get the chance to implement it - I have to wait for the next opportunity.  Some times it's days before I can get to implement something I've learned, but by then I have forgotten my thoughts and have to go back and re-read the subject.  It's very frustrating to me.  That's one of the main reasons I prefer the example code you guys post, I can get key words from those examples and study one element at a time and work toward an end.
Anyway, I was talking with one of the old-time drafters who used Microstation and he informed me that if something was set on Level 0, it would be invisible.  I still have to go verify this and make my conversion code applicable to this situation, but I'm a step further along now.

Tim, can you post for me the URL to the help file you found the DXF 70 code in ??  I have been trying to understand and work with Autodesks site:
http://autodesk.com/techpubs/autocad/acad2000/dxf/
And I keep coming up short.
Quote
70-78
 Integer values, such as repeat counts, flag bits, or modes
 

Using the help file on the PC, I come across everything but what I need.  Another frustrating moment.
I have found the 70 code for Attribute flags, MText flags, 'IsReallyLocked' flag, secondary attributes, etc, etc.
When I search for invisible edges, ...


Anyway, I'm still learning and slowing getting more proficient at working with the code.  But now you know why I sometimes sound so desperate and frustratingly annoying when you guys have to answer my questions and help me out.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #17 on: May 05, 2010, 11:56:41 AM »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #18 on: May 05, 2010, 12:04:30 PM »
DXF help for 3D faces.

DXF help, Common DXF values for entities. i.e. "Where's the info on the 60 group?"

Well, ... there you have it.  I feel like an idiot. :wink:   I just don't know how to get around in there well enough yet.  I'll get there, bear with me.

Thank you all for everything.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

T.Willey

  • Needs a day job
  • Posts: 5251
Re: 3DFace DXF code (60 . 1) ...
« Reply #19 on: May 05, 2010, 12:06:58 PM »
If you can see the object in the drawing spaces, then most likely it will be in the ' entity ' section of the dxf codes.
/FYI.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #20 on: May 05, 2010, 12:09:40 PM »
All of us got where we are today by many "leg ups" from others, be it from discussion forums, one on one help, books yada. Just be patient with yourself Hangman, the rest of us will be fine, and can hopefully pitch in when called upon. :)
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #21 on: May 05, 2010, 12:24:24 PM »
All of us got where we are today by many "leg ups" from others, be it from discussion forums, one on one help, books yada. Just be patient with yourself Hangman, the rest of us will be fine, and can hopefully pitch in when called upon. :)

x2 Well said.  :-)

Hangman

  • Swamp Rat
  • Posts: 566
Re: 3DFace DXF code (60 . 1) ...
« Reply #22 on: May 05, 2010, 04:17:43 PM »
All of us got where we are today by many "leg ups" from others, be it from discussion forums, one on one help, books yada. Just be patient with yourself Hangman, the rest of us will be fine, and can hopefully pitch in when called upon. :)

I appreciate the encouragement Michael.  I do tend to worry more about offending the guru's here with my requests though, I don't like bugging others for what I'm sure some would consider trivial.  But the help is very much appreciated.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: 3DFace DXF code (60 . 1) ...
« Reply #23 on: May 05, 2010, 04:23:34 PM »
Don't worry, you are in no way bugging us - we're here out of choice - and, what's more, its refreshing to encounter someone who genuinely wants to learn.  :-)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: 3DFace DXF code (60 . 1) ...
« Reply #24 on: May 05, 2010, 05:53:16 PM »
I appreciate the encouragement Michael.  I do tend to worry more about offending the guru's here with my requests though, I don't like bugging others for what I'm sure some would consider trivial.  But the help is very much appreciated.

You're welcome hangman, but I have to tell ya -- you misunderstand basic nerd-dom. The CADD nerds here thrive on challenges and enjoy helping out, the more unique / obscure the challenge the better.

Part of the equation is that "the teacher frequently learns the most", i.e. it's a win-win, so you're helping out by providing the challenges / opportunities to teach / share expertise yada. Subtitle: the worst mistake you could make is to withhold your questions because you think you're imposing. Just bring it.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst