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
1038 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 21 of 25
VitalyF
in reply to: Keith.Brown

Yes, of course you need to set the style after using the command "LabelCurveAdd."

I always use the option "Use layer key from system definition" and I have no problems!!! )

 

Also styles all labels must be in the template and "Project standard" for synchronization.

Label styles must refer to it

Message 22 of 25
Keith.Brown
in reply to: Keith.Brown

Hi,

 

I created a small .net project that creates a new lisp command called IMPORTLABELCURVESTYLE.  The command accepts 2 arguments, the name of the style to import and the path of the drawing to import from.  It will first check to see if the style is already present in the current drawing.  If it is already present then the command will do nothing, if it is absent then it will go to the drawing to import from, grab the style, and import it into the current drawing.

 

Command line usage looks like:

 

(IMPORTLABELCURVESTYLE "STYLENAME" "STYLEPATH")

 

example

 

(IMPORTLABELCURVESTYLE "MyFavoriteStyle" "C:\\Users\\Keith\\Desktop\\MyStyles.Dwg")

 

The command will generate several different types of errors depending on what is wrong.

 

AutoCAD error: eFileSharingViolation  -   The stylepath drawing is opened by another user or process

AutoCAD error: eFileNotFound            -   The stylepath drawing is unable to be found

LISP error: Too many arguments          -   To many arguments were supplied to the Lisp function 

LISP error: Too few arguments             -   To few arguments were supplied to the Lisp function

 

are some of the more common errors.  Other errors might be generated depending on use.

 

To use the project, download the zip file onto your desktop.  Once downloaded right click on the file and go to properties and then unblock the zip file.  This is needed because windows tends to block dlls downloaded from the net.  Once you have unblocked the zip file unzip it and place the folder BrowMepLisp.bundle in your C:\Users\<User Name>\AppData\Roaming\Autodesk\ApplicationPlugins folder.  Then restart Autocad MEP and the new lisp command will be available.

 

If there is any interested I would be more than happy to create other commands for the different styles.  The framework is in place to create them without to much hassle.

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

Hi Keyth,

 

It's great, but what this function differs from the standard function -

Copy, Move, Redefine, Synchronize and etc. with the "Styles Manager"?

 

 

 

 

Vitaly

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

It differs because once setup is complete it is all automatic.  You don't have to go into the style manager and ask it to synchronize or copy/move anything.  Its all done behind the scenes with the touch of one button.

 

I could be wrong because i don't use the standards synchronize functionality but if you have a single type of label duplicated 5 times and all on different layers depending on the pipe that they are attached to how does the synchronize functionality work?  Will it move them all to the same layer because it thinks that is the layer that the label goes on due to standards?  I think you can use the layer override in the system definition but what if you are using the layer override for something different? 

 

It just makes getting the labels on the correct layer quick and easy without any user interaction what so ever.  It also means that you don't have to bloat your template file with every style that you will ever use.  You can pull the styles in automatically as you need them without the user ever knowing what is being done.

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

If we follow this logic. you need a lot of Lisp functions.

The next step you want to combine them into one dialog box and it will - "Style Manager"?! )

 

PS

To synchronize the styles using the Style Manager does not even need to press a button

Also there are no problems with the automatic modifications of labels... etc ... etc ...

 

... 

 

Well, the user decides how better for him ....

 

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

Post to forums  

Autodesk Design & Make Report

”Boost