Jump to content

Restore the MLeader Style Arrowsymbol to default


hmsilva

Recommended Posts

Hello all,

a few days ago I was confronted with this situation:

someone was trying, programmatically, to restore the MLeaderStyle Arrowsymbol to the default, Close Filled, unsuccessfully.

 

I tried restore, first I set the System Variable "dimldrblk" to the default with ".", and then I tried to change with "vla-put-ArrowSymbol" and "vlax-put-property", and always got the same error "Automation Error Key not found", I provided the keys "" "." "_." "CloseFilled" and many others, also unsuccessfully.

 

To work around this situation, I copied the existing style, changed the name to the original style, created a new style with the definitions of the previous style, but without providing the "Arrowsymbol" definition, so the new style gets the old settings but with the default "Arrowsymbol" the Close Filled, I collected all mleaders with the old style, and chage the "StyleName" property to each one of them...

 

I think it's too much work, only to get back to the default "Arrowsymbol".

if someone has a simpler approach, or know which Key will be accepted as default, or Close Filled, I will be very grateful.

 

Cheers

Henrique

Link to comment
Share on other sites

I tried restore, first I set the System Variable "dimldrblk" to the default with "."

 

Note that the DIMLDRBLK System Variable applies to the Dimension Style Leader (LEADER / QLEADER), not an MLeader.

 

Regarding the arrowsymbol property, this unfortunately must take the value of a block defined in the drawing and does not follow the behaviour described in the documentation (surprise)

Link to comment
Share on other sites

Note that the DIMLDRBLK System Variable applies to the Dimension Style Leader (LEADER / QLEADER), not an MLeader.

 

Regarding the arrowsymbol property, this unfortunately must take the value of a block defined in the drawing and does not follow the behaviour described in the documentation (surprise)

 

 

Lee Mak,

I know that DIMLDRBLK System Variable applies to the Dimension Style Leader, but only for testing, try to set a different arrowsymbol than that is defined in DIMLDRBLK.

 

EDITED:

I have not explained myself correctly, the use of "DIMLDRBLK", is only to place on the dwg a block definition, with the value we set "DIMLDRBLK".

 

for example:

I only have one mleader style in my dwg, "standard" and I need to change the arrowsymbol to "_BoxBlank", if I try to assign the "_BoxBlank" to the rrowsymbol, I get the error message "Automation Error Key not found", but if I first set "DIMLDRBLK" to "_BoxBlank", does not give any error, because the block already exists.

what I was trying with the the use of "DIMLDRBLK" set to ".", was to put in the dwg, a block definition of "_ClosedFilled", and then set the arrowsymbol...

 

TIA

Henrique

Edited by hmsilva
Link to comment
Share on other sites

  • 2 years later...
Regarding the arrowsymbol property, this unfortunately must take the value of a block defined in the drawing and does not follow the behaviour described in the documentation (surprise)

 

So using vlax-put-property or vla-put-arrowsymbol are not valid functions when trying to set the arrowhead style for mleaders? If I am trying to use one of the out-of-the-box styles, do I need to add that block to the block collection?

Link to comment
Share on other sites

So using vlax-put-property or vla-put-arrowsymbol are not valid functions when trying to set the arrowhead style for mleaders? If I am trying to use one of the out-of-the-box styles, do I need to add that block to the block collection?

 

Yes, you can use vla-put-arrowsymbol, but yes, you will also first need to define a block whose block name is one of the valid property values for this property.

Link to comment
Share on other sites

Ok. So I got the block collection by using...

(setq acadobj (vlax-get-acad-object)
       doc (vla-get-activedocument acadobj)
       blkcoll (vla-get-blocks doc)
)

 

I then proceeded to add an arrowhead style name to the block collection by using...

(vla-add blkcoll (vlax-3d-point 0 0 0) "_ClosedBlank")

 

(This is not the arrowhead style I want, but it wouldn't allow me to add "" for the Closed Filled style.)

 

That allowed me to successfully change the arrowhead style to Closed Blank, but it is not visible on the end of the leader. Am I adding the block correctly? Also, I am using the names given in the help file as shown here.

Link to comment
Share on other sites

Ok. So I got the block collection by using...

(setq acadobj (vlax-get-acad-object)
       doc (vla-get-activedocument acadobj)
       blkcoll (vla-get-blocks doc)
)

I then proceeded to add an arrowhead style name to the block collection by using...

(vla-add blkcoll (vlax-3d-point 0 0 0) "_ClosedBlank")

(This is not the arrowhead style I want, but it wouldn't allow me to add "" for the Closed Filled style.)

 

That allowed me to successfully change the arrowhead style to Closed Blank, but it is not visible on the end of the leader. Am I adding the block correctly? Also, I am using the names given in the help file as shown here.

 

Yes, you have defined the block correctly, however, the block definition is empty and so you will need to add the appropriate objects to the definition.

Link to comment
Share on other sites

So do I need to redraw the arrowhead or load the block into the drawing manually as a part of my template file?

 

Also, when adding the style to the block collection, how to you define the default "Closed filled" if it won't accept the key ""?

Link to comment
Share on other sites

So do I need to redraw the arrowhead or load the block into the drawing manually as a part of my template file?

 

Yes - essentially, the block needs to be defined in the drawing in order to be used as the arrowhead for an MLeader Style.

 

Also, when adding the style to the block collection, how to you define the default "Closed filled" if it won't accept the key ""?

 

I'm not aware of a way around this.

Link to comment
Share on other sites

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