I wonder if I am missing something... why does my layer key not get used?
It looks like it will... but alas... when I commit it does not!
I did some experimenting... if I use a layer key that happens to be above 'LABEL' in the list... the annotation just goes straight to 'LABEL' without looking as if it will work. But if I use a layer key that happens to be below 'LABEL' it appears like it gets used... but when I commit it switches to the 'LABEL' key. I tried to rename the 'LABLE' layer key... but it would not allow me to.
I tried to create a new layerkeystyle... but 'LABEL' came in anyway. Is there somewhere in the drawing that.
Is there any work-around?
See attached video.
Solved! Go to Solution.
Solved! by Keith.Brown. See the answer in context.
This macro in the command works for me.
^C^C_AecbLabelCurveAdd;Style;Standard - Pipe;
Just remove the two slashes afterwards. So now you just select the tool, then select all the pipes that you want to add the label to and then hit enter. Not until you hit the enter will the layers update.
This might seem like a silly question but did you make sure that the layer key style is present in the same drawing that the label style is being pulled from? I cannot say for certain that if you create a palette tool from a style and then try to set the layer key of the tool that it will grab the layer key dialog from the style drawing or the current drawing. An easy way to check is to just open your style drawing and verify that the layer key is there.
Pausing to check... yes it is available.
I checked the styledrawing... the dwt file... as well as the new drawing that was created from the template.
I also tried it with a Basic Command tool... it uses my Layer Key when this is ran the first time... but subsequent labels go back to the default LABEL key.
VitalyF... these were good points about toggleing off 'Use layer key from system definition' and 'Use layer override from system definition'... and the 'Key file to auto-import' setting... I have our layer keys are pulled in from a network location - and the keys are in there. I checked all these points but didn't have the first two in place... I set these settings but the behaviour didn't change.
Assumming you did the video you posted.... ?
When you add the first label after clicking the 'Command Tool' toolpalette tool it worksl... but if you click the pipe to add a second label the requested layer key is not honored? It goes back to the LABEL layer key. Is this the behaviour you get also?
Also, I've tried now two methods with the tool... a 'Command Tool' and an 'Add Label Tool'.
The Command Tool comes the closest to honoring the layer key... however, I wanted the tool to also import the label style so I tried the 'Add Label Tool'. This one still does not honor the requested company standard layer key at all.
I believe that the problem is related to the tool that you are using. It looks like you either copied an existing label from a tool palette or dragged a label to a tool palette. Its been a long time since i have messed with labels but i believe that this is normal behavior for them from what i can recall from my conversations with Autodesk. In order to make it work what you need to do is what VitalyF has done and that is create a commandtool and use that instead. Go to your content browser and search for Command Tool. Not command tool with properties. Drag the command tool to your tool palette and in the command dialog enter "^C^C_AecbLabelCurveAdd. Then in the Layer Key box enter in your layer key. This should do the trick. Unfortunately this will only complete the command and will not pull the label in from another drawing.
You could create a custom lisp command that will pull in the style first if it is not already present and then call the labelcurveadd command to get the effect that you want. Since there are no AutoCAD MEP Lisp utilities you will need to search the NOD in the database until you find the dictionary AECB_LABELCURVE_STYLES. Then look for the name of the label curve style you are using in that dictionary. If it is not present then you will need to copy the style from your style drawing repository into your current drawing. Once that is complete then call the labelcurveadd command. Wrap all of these steps into a custom command and then call that custom command from the tool palette command tool.
** EDIT ** Oops I reread all of the posts and noticed that you used the basic command tool already. Using this tool I do not have the issues that you are describing.
Assumming you did the video you posted.... ?
Yes, I made this video )
... but if you click the pipe to add a second label the requested layer key is not honored?
Each label you have to take from the palette. Do not use "Enter"
Have you tried to insert the label automatically?
"'I believe that the problem is related to the tool that you are using..."
Did you read the replies both to you and to VitalyF... practically your entire response reads as if you did not.
I attached image that shows that I did try using a 'Command Tool' as VitalyF suggests.
Perhaps I did miss something... I am not at all above it.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions to get help installing your software.
The AutoCAD MEP forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.