Drawing at specific layer

Drawing at specific layer

dani-perez
Advocate Advocate
2,455 Views
11 Replies
Message 1 of 12

Drawing at specific layer

dani-perez
Advocate
Advocate

Hello all

 

I am trying to find a code to create lines and plines at a specific layer. The idea would be write line or poliline, select the layer with 2 or 3 letters and finally make the object.

 

Thanks all.

0 Likes
Accepted solutions (1)
2,456 Views
11 Replies
Replies (11)
Message 2 of 12

pendean
Community Legend
Community Legend
What if your layers share common first 2-3 letters in their name?
0 Likes
Message 3 of 12

Kent1Cooper
Consultant
Consultant

@dani-perez wrote:

.... The idea would be write line or poliline, select the layer with 2 or 3 letters and finally make the object. ....


 

Can you explain the reason that you prefer those steps to setting the Layer first, then starting the LINE or PLINE command?  You can, of course, do it that way without any code.  And if you want to draw more than one  Line or Polyline on that Layer, you won't have to go through the Layer-designating step for each one.

Kent Cooper, AIA
0 Likes
Message 4 of 12

scot-65
Advisor
Advisor
One could create commands inside the CUI to do just as you request.
a) Create a command inside the command list pane (lower-left pane).
The macro should read something like this: ^C^C-layer;Make;Line;;Line;
b) Assign the command a image [optional, depending where you plan to place it].
c) Populate the user interface (UI) by dragging and dropping the command
into any one of these areas (top-left pane): Toolbars, Ribbon, Menus (and/or
Screen Menu). One can also populate a Shortcut Menu area, Quick Access and
Double Click Actions (untested).

Downside to this method - clicking a UI element to start (and not using the keyboard).

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 12

john.uhden
Mentor
Mentor

I think your answer depends on the adjective.

I doubt that "pusillanimous" will help, though it will use more toner.

John F. Uhden

0 Likes
Message 6 of 12

ВeekeeCZ
Consultant
Consultant

I do like Search content at command line feature. That allows you to set current layer (and other) current by simple typing some key letters from the name.

As you can see from the screencast HERE it's quite fast.

I do limit the searchable content for Layers only, since I use only that.

Message 7 of 12

dani-perez
Advocate
Advocate

Hello,

 

It would be strange

0 Likes
Message 8 of 12

dani-perez
Advocate
Advocate

Hello,

 

It's just an idea. I would like to select the layer and the command, or the command and later the layer, it doesnt matter. If there is a no-coding way, I would like to know that.

0 Likes
Message 9 of 12

dani-perez
Advocate
Advocate

Hello,

 

It sounds good, I will try it,

 

thanks.

0 Likes
Message 10 of 12

dani-perez
Advocate
Advocate

Hello,

I think it would be the perfect solution. how did you do that?

I have never heard about search content.

0 Likes
Message 11 of 12

Sea-Haven
Mentor
Mentor

You could use a string input like l-abc a-abc in a lisp so it looks at 1st character so l =line then would look at following string and compare layers, if more than one Abc* layer decline open and pick layer then do command. 

 

Only hiccup cup is have to start it. 

 

But big big but you can do reactors so a l- is recognised, I have used this to short cut some commands eg f123 is do a fillet with radius 123. C23 is a circle with radius 23 you can type whatever you want for the value it just looks at the 1st character.

 

I am on IPad so can not post code if you search cadtutor BIGAL reactor it is there. 

0 Likes
Message 12 of 12

ВeekeeCZ
Consultant
Consultant
Accepted solution

@dani-perez wrote:

Hello,

I think it would be the perfect solution. how did you do that?

I have never heard about search content.


 

Well, now you did. Glad you like it. But not sure what more than the video you need to understand the feature. 

Oh wait, there is an audio missing. And no magic works without a secret spell. Fortunately for you, all the spells are revealed HERE. Well, maybe not the all. In that case, THIS guy knows them all for sure.

Gash, that was just a tip of mine, a good one. Look up, search, dig, just learn yourself!! Not going to lead your hand.

0 Likes