Jump to content

creating new layer and put for entlast object


Ajmal

Recommended Posts

What is the problem? 

It's not working when am offsetting its not coming,

 (setq acadObj (vlax-get-acad-object))
  (setq doc (vla-get-ActiveDocument acadObj))
(setq ilyrc(getstring(strcat "\Specify insulation layer <" (vl-princ-to-string ilyr)"> : ")))
(setq layers (vla-get-Layers doc))
  (setq ilyr (vla-Add layers ilyrc))
  (setq plyr (vla-get-ActiveLayer doc)))



(function
         (lambda (x)
           (vla-offset x (+ *ff))
	   (vla-put-layer (vlax-EName->vla-Object (entlast))plyr)
	   (vla-offset x (+ iszo))
	   (vla-put-layer (vlax-EName->vla-Object (entlast))ilyr)
	   (vla-offset x (- *ff))
	   (vla-put-layer (vlax-EName->vla-Object (entlast))plyr)
	   (vla-offset x (- iszo))
	   (vla-put-layer (vlax-EName->vla-Object (entlast))ilyr)))

 

Link to comment
Share on other sites

6 minutes ago, Ajmal said:

(vla-put-layer (vlax-EName->vla-Object (entlast))plyr)

 

Try:

(vla-put-layer (vlax-EName->vla-Object (entlast)) ilyrc)

 

Link to comment
Share on other sites

13 minutes ago, Jonathan Handojo said:

 

Try:


(vla-put-layer (vlax-EName->vla-Object (entlast)) ilyrc)

 

It's working 

 

how can i put current layer like this

 

Link to comment
Share on other sites

Any (vla-add...) you do to add an object (or even entmake really) will be drawn to the current layer by default, so you don't need to put vla-put-layer if you want the object to go to the current layer

Link to comment
Share on other sites

"line" layer is "0"

but current layer is "ajmal"

 

vla-offset 

select line then it comming "0" layer 

but i need corrent layer (active layer)("ajmal") 

 

Link to comment
Share on other sites

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