Jump to content

Recommended Posts

Posted

Hi,

 

I have a found a few post regarding that sam issue, one seems to change direction half way though the post and the other has a lsp routine that don't seems to select objects.

 

We basically create lots of files to insert into a drawing which can then be used to create 3D visuals.

 

I insert from a external file a bookshelf type unit which i made up from a side elevation of polylines, to which i then explode last then extrude previous and select the path of extrusion.

 

The problem is it all works fine untill i get my final objects.

 

I great the original polylines in the layers i want but they then change to my CLAYER.

 

Anyone have a somple way of keeping the original layers, bearing in mind that there may be more than one layer in each external file.

 

Thanks in advance.

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • ReMark

    11

  • crescent

    7

  • CADMAN56

    6

  • rkent

    1

Posted

Why aren't you doing your extruding on the original layer?

Posted

I'm trying to make the process a quick as possible...

 

If you can imagine a kitchen type base unit with open shelving. I have a back and 2 shelves with hi impact edging.

 

The end cheeks are done as a block seperately so there is no peoplem there.

 

But the extrusion is between both end cheeks.

 

The original layer for example is vis_disp on the back and shelves but vis_disp_e on the hi impact edging.

 

The reasoning is that they may require difference materials attaching when creating a 3d visual.

Posted

And you attach your materials by layer right?

Posted

Correct, but not just in CAD, in studio max too.

Posted

What is this lisp routine you refer to in your first post? What is it supposed to do?

Posted
(defun c:geo_extrude (/ nabor dlina i oldcolor sloy ima cvet 3Dob c b)
 (setq	nabor	 (SSGET ":L" '((0 . "LWpolyline,circle")))
dlina	 (SSLENGTH nabor)
i	 -1
oldcolor (getvar "CECOLOR")
b (getreal "Height of extruding")

 )
 (setvar "CECOLOR" "1");appoint any colour, that only not "BYLAYER"
 (REPEAT dlina				;(REPEAT
   (SETQ
     sloy (ASSOC 8
	  (SETQ ima (ENTGET (SSNAME nabor (SETQ i (1+ i)))))
   )
     cvet (if (ASSOC 62 ima)
     (ASSOC 62 ima)
     '(62 . 256)
   )

   )
   (if	(= (cdr (ASSOC 0 ima)) "CIRCLE")
     (setq c 0)
     (extrude-y-n ima)
   )
   (if	(= c 0)				;(if
     (progn				;(progn
(VL-CMDF "_extrude" (CDR (ASSOC -1 ima)) "" b)
(SETQ 3Dob (ENTGET (entlast))
      3Dob (SUBST sloy (ASSOC 8 3Dob) 3Dob)
      3Dob (SUBST cvet (ASSOC 62 3Dob) 3Dob)
)
(entmod 3Dob)
     )					;)progn
   )					;)if
 )					;)REPEAT
 (setvar "CECOLOR" oldcolor)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun extrude-y-n (ima / spisversh dlina a b)
 (setq	spisversh
	  (mapcar
	    'cdr
	    (vl-remove-if-not '(lambda (x) (= (car x) 10)) ima)
	  )
dlina	  (1- (length spisversh))
a	  -1
c	  0
 )
 (if (or (= (cdr (assoc 70 ima)) 1)	;(if1
  (equal (nth 0 spisversh) (nth dlina spisversh))
     )
   (progn				;(progn
     (repeat dlina			;(repeat1
(setq a	(1+ a)
      b	-1
)
(repeat	dlina			;(repeat2
  (setq b (1+ b))
  (if				;(if2
    (and (> (abs (- a b)) 1)
	 (or (/= a 0) (/= b (1- dlina)))
	 (or (/= b 0) (/= a (1- dlina)))
    )
     (if			;(if3
       (inters (nth a spisversh)
	       (nth (1+ a) spisversh)
	       (nth b spisversh)
	       (nth (1+ b) spisversh)
       )
	(setq c 1)
     )				;)if3
  )				;)if2
)				;)repeat2
     )					;)repeat1
   )					;)progn
   (setq c 1)
 )					;)if1
)

Posted

There is a post called "extrude and layers"

Posted
There is a post called "extrude and layers"

 

I'll take a look at it momentarily. I'll be back.

Posted (edited)

In 2011 in options, 3d, there is a place to decide how to handle this. 3D modeling, 3d objects, deletion control.

 

See also DELOBJ in help.

Edited by rkent
added words
  • 1 month later...
Posted

Support request sent to autocad follows..................they sent me here.

Older versions of autocad always kept the original layer of the object when extruding. This is the only logical course of action....

If you have complex assemblies with many parts already identified in a plan by their layers and you are building and extruding off that plan; what sense does it make to change to the current layer...

Are you sure there isn't a system variable for this???

If not ,,,,i suggest you contact the programmers and put things back the way they were.

Please research this and get back to me..........i would hate to have to draw in an old environment just to get things to work properly. That would be counter productive in too many ways.

Posted

You would like us to "research this and get back to you"? What, you're too busy to research it yourself?

 

Why should we contact the programmers at AutoDesk? We aren't hired help; we're volunteers.

Posted
In 2011 in options, 3d, there is a place to decide how to handle this. 3D modeling, 3d objects, deletion control.

 

See also DELOBJ in help.

 

DELOBJ

Controls whether geometry used to create 3D objects is retained or deleted.

 

Wasn't the OP more interested in keeping the original layer of the object being extruded (as is CADMAN56) as opposed to the original geometry?

Posted
support request sent to autocad follows..................they sent me here.

Older versions of autocad always kept the original layer of the object when extruding. This is the only logical course of action....

If you have complex assemblies with many parts already identified in a plan by their layers and you are building and extruding off that plan; what sense does it make to change to the current layer...

Are you sure there isn't a system variable for this???

If not ,,,,i suggest you contact the programmers and put things back the way they were.

Please research this and get back to me..........i would hate to have to draw in an old environment just to get things to work properly. That would be counter productive in too many ways.

 

i just got reamed in an email by someone who can't read,,,,saying " why am i asking the forum to research?"

in my first line it says " support request (that i) sent to autocad"

asking them to research this...

In autocad 2005, when you extruded ,the layer remained the same.

Posted

Your post is somewhat confusing. I got the same impression.

 

I'm going to check out what you said about 2005 so you'll have to give me a couple of minutes.

Posted

So,,,,,this lsp program mentioned in this thread..............do i copy this into and at the end of the "autocad2011doc.lsp"?

Can anyone tell me how to get it to work....i tried making it its own file and naming it "extrudelayer.lsp" and then tried loading it thru appload, but can't get it to work.

I'm not familiar at all with programming....

Thanks

Posted

I checked out your claim using AutoCAD 2004. Unfortunately, it did not prove to be true.

Posted
So,,,,,this lsp program mentioned in this thread..............do i copy this into and at the end of the "autocad2011doc.lsp"?

Can anyone tell me how to get it to work....i tried making it its own file and naming it "extrudelayer.lsp" and then tried loading it thru appload, but can't get it to work.

I'm not familiar at all with programming....

Thanks

No, you do not HAVE to add it to any other file. The lisp routine can be loaded as you said via the Appload command. To run the routine type geo_extrude at the command line and follow the prompts. As far as I can tell the routine does what it says and what you want it to.

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