Jump to content

Recommended Posts

Posted

I want to write a LISP to import Multi Leader styles in our drawings. Is there an equivalent to DIMIM and DIMEX for Multi Leaders?

 

If not is there another way I can store them and recall them?

 

Thanks

Posted

I don't understand why people fuss with all that. Just create all your styles in a DWG file and insert it into the drawing on startup. It will give you everything you need. You don't even have to have it insert the block completely. As soon as it drops it in, just have it cancel the insert command and it will only have inserted the definition.

Posted

Thanks Alanjt,

How do I interupt this command in LISP?

 

(command "_.insert" "Multi_Leader_Definitions" INPT "1" "1" "0")

Posted

Your question first indicates that you want to export the Multi-leader styles/

And in your second post, you are trying to insert them as a block.

 

That's really odd.

 

Settle your things up first. and ask again.

 

Tharwat

Posted

My first question asks?

 

I want to write a LISP to import Multi Leader styles in our drawings.

 

Then Alanjt advised I load a block definition so that is why I asked about that.

Posted
Thanks Alanjt,

How do I interupt this command in LISP?

 

(command "_.insert" "Multi_Leader_Definitions" INPT "1" "1" "0")

(command "_.insert" "Multi_Leader_Definitions=" nil)
(command "_.purge" "_b" "Multi_Leader_Definitions" "_n")

 

Your question first indicates that you want to export the Multi-leader styles/

And in your second post, you are trying to insert them as a block.

 

That's really odd.

 

Settle your things up first. and ask again.

 

Tharwat

Read entire thread before responding. :wink:

Posted

 

Read entire thread before responding. :wink:

 

OK. SIR. :)

 

I will do .

Posted

This will insert the block definition into the drawing, thus inserting the styles (the = sign will overwrite any existing block definition). Once it cancels (the nil), it will purge the block definition, leaving you with nothing but the styles/layers that existed in the file you just 'inserted'.

Posted

Why not create your mutli-leader style as you want it, draw a multi-leader based on that style, then drag that multi-leader onto a tool palette.

This way you can edit which layer it goes onto, along with it's linetype, lineweight and colour, etc.

There would be no need to mess around with any other form of programming then.

Posted
Why not create your mutli-leader style as you want it, draw a multi-leader based on that style, then drag that multi-leader onto a tool palette.

This way you can edit which layer it goes onto, along with it's linetype, lineweight and colour, etc.

There would be no need to mess around with any other form of programming then.

That is still a fantastic idea, but I would still stick with inserting the block of all styles into the drawing. That way, if you want to make any changes, you can easily open the style file and easily make changes. Whereas, if you put them in ToolPalettes, you will have to delete and recreate that option in ToolPalettes if a change has to be made to the style itself.

 

Hell, if one didn't want to put the insert portion into the startup, you could always just embed the code within ToolPalettes and insert them that way. I actually used that option in an office where we had some LT users (I just had to convert to LISP code to a macro).

Posted

I have my dimstyles setup in the template so there's no need for this but... wouldn't this be correct?

 

 
(setq style "");;set style here!
(if (eq (tblsearch "DIMSTYLE" style) nil)
 (command "_.insert" "Multi_Leader_Definitions=" nil)
)

 

I do this with my mlines

Posted
I have my dimstyles setup in the template so there's no need for this but... wouldn't this be correct?

 

 
(setq style "");;set style here!
(if (eq (tblsearch "DIMSTYLE" style) nil)
 (command "_.insert" "Multi_Leader_Definitions=" nil)
)

I do this with my mlines

You could just use OR or (if (not.

 

The template is great, but what if you open a drawing that was created without the template or you purged the style from the drawing?

Posted

Yeah I'm not so sure about the template either cause I have a plot routine setup that purges the drawing each time someone goes to plot. File sizes were getting crazy and you might as well be talking to the cows when trying to get the lads to purge.

 

I tried to use tool palettes here in the office too and was told pretty quickly what the lads thought of them. The kind of thing that can only be repeated after 9pm.

 

I'll stick with Alanjt's block method and LISP thanks..

  • 9 months later...
Posted

Gentlemen

I know it's a little late to get on this bandwagon, but I have a couple of qeustions.

 

We currently have a standard template with our predefined multileaders, but these are all based on a dimscale of 1.00. When we start anotating our drawings we then modify our dimstyles manaully to the appropriately scale and likewise the standard multileaders - we have 8. If we insert our standards template - acad.dwg, (into an older drawing) it will will not overide the default paramters for the "Standard" multileader. As far as I know you cannot purge the "Standard" mutlileader, I have tried but it will not go away. It comes back with parameters that do not concide with our standards.

 

So our question is; once we have inserterted all of the new multileaders styles, how would you recommend we programmactically reset parameters such as scale, text size, text styles, and leader location (Middle of text), etc. I really would like to generate a script I can run with a parameter of the current dimscale, and reset the parameters programatically as needed. Most of this is genereic so a one time through would be nice. It could even be automated, based on our default dimension style "Std" - I have learned to just let AutoCAD have the "STANDARD" dimstyle. Perhaps this would be the best advice for the multileader as well. But I really hate to carry the unused/unneeded overhead for these items. And some of our more novice (and older) users do not understand the implications of using the wrong multileader style or dimension style.

 

Once last point of information, I am a new member, so I would not be suprised if the solution was simple.

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