Community
AutoCAD MEP Forum
Welcome to Autodesk’s AutoCAD MEP Forums. Share your knowledge, ask questions, and explore popular AutoCAD MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My Layer Key doesn't get used. LabelCurveStyle

24 REPLIES 24
SOLVED
Reply
Message 1 of 25
mdhutchinson
1073 Views, 24 Replies

My Layer Key doesn't get used. LabelCurveStyle

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.

24 REPLIES 24
Message 2 of 25
Keith.Brown
in reply to: mdhutchinson

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.

Message 3 of 25
mdhutchinson
in reply to: Keith.Brown

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.

Message 4 of 25
mdhutchinson
in reply to: mdhutchinson

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.

 

Message 5 of 25
VitalyF
in reply to: mdhutchinson

Check "AecbLayerStd.dwg" your key layer should be there.

see also LayerKey setup, type command _AecDwgLayerSetup

 

LayerKeySetup.GIF

 

 

LayerKeyLabel.gif

 

 

LayerKeySetup_1.gif

Message 6 of 25
mdhutchinson
in reply to: VitalyF

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.

Message 7 of 25
Keith.Brown
in reply to: mdhutchinson

Hi,

 

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.

 

HTH.

 

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

 

 

Message 8 of 25
VitalyF
in reply to: mdhutchinson

Hi,

 

     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?

Message 9 of 25
mdhutchinson
in reply to: Keith.Brown

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

 

 

 

 

 

Message 10 of 25
mdhutchinson
in reply to: VitalyF

I tried doing the automatic label... it went to LABEL key instead of the one I want.

 

 

Message 11 of 25
Keith.Brown
in reply to: mdhutchinson


@mdhutchinson wrote:

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

 


I went back and reread them and edited the post to say as much right after i posted it originally.  Sorry.

 

I do not have the issue that you are describing using the command tool.  It works 100 percent of the time for me.  Using the label tool works 0% of the time for me.

Message 12 of 25
Keith.Brown
in reply to: VitalyF


@VitalyF wrote:

 

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

 


I can reproduce the issue by using the label tool and finishing the command and then hitting enter again.  This will cause the program to just run the AecbLabelCurve add command and not use the tool palette.  Is it possible that you are doing this and not reusing the tool palette tool again as VitalyF describes?

Message 13 of 25
mdhutchinson
in reply to: Keith.Brown

ahhh... yes.  I see what is happening.

I have the macro as follows:

 

*^C^C_AecbLabelCurveAdd;Style;Pipe Elevation (TOI);\;\;

 

The asterisk recyles the command... The ^C^C cancels the previous command up to two levels deep.

However, I tried a couple variations but still get the same result excepting for without the asterisk the command simply ends after the first label.

 

*_AecbLabelCurveAdd;Style;Pipe Elevation (TOI);\;\;

_AecbLabelCurveAdd;Style;Pipe Elevation (TOI);\;\;

 

In any case, the user has to go back and select the tool again... too bad there isn't an command line option to enter the layer key.

 

Phooey... I guess I'll have to resort to lisp again.

 

 

 

 

Message 14 of 25
Keith.Brown
in reply to: mdhutchinson

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.

Message 15 of 25
mdhutchinson
in reply to: Keith.Brown

This is the best yet.

The only thing you cannot do is to add the asterisk, or do an enter to bring back the command after the initial time.

 

Thanks!

 

The only thing now to do something to import the style into the drawing...

I could put it in the templates, or perhaps add a short lisp to import a block holding the style.

Message 16 of 25
Keith.Brown
in reply to: mdhutchinson

If i have some spare time next week i will write a .net program that will create some new lisp commands that will import a style if it is not already present in your drawing.  The command will just need a stylename, styletype, and a source drawing as arguments.  In this case the styletype would be DictionaryLabelCurveStyle.  If i put some thought into it i could generalize it so you could import any of the available styles in a drawing.

 

It shouldn't be too difficult as I am already using these type of functions in my .net programs.  I will just need to add the LISP availability to it.

Message 17 of 25
VitalyF
in reply to: mdhutchinson

This is another way, a more simple, does not require any additional settings

Pre-selected objects using "Select Similar"

 

LabelcurveAdd.gif

 

 

Message 18 of 25
mdhutchinson
in reply to: VitalyF

You have only one labelcurve style in the drawing?

... or rather, are you showning that you can select the pipe first?

Message 19 of 25
VitalyF
in reply to: mdhutchinson

Any style and do not take the label each time from the palette
LayerKey stored

Message 20 of 25
Keith.Brown
in reply to: VitalyF

I believe that they are looking to have a tool for each type of style.  That would mean that they need to set the style after using the LabelCurveAdd command.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost