Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Palette Tool for inserting Dynamic Block with Visibility

3 REPLIES 3
Reply
Message 1 of 4
RocksterB
389 Views, 3 Replies

Palette Tool for inserting Dynamic Block with Visibility

I need to create a few Tool Palette tools that will insert a dynamic block with several visibilities. Would someone suggest the tool's command string to handle this or is there a tool property's kit available that I can use that has these settings? Utilizing a tool with the flyout option would be an added bonus.Smiley Wink

 

Thanks!

3 REPLIES 3
Message 2 of 4
Moshe-A
in reply to: RocksterB

RockSterB Hi,

 

Hope this is still actual

 

You can accomplish this with this lisp

attached SDBV.LSP (Set Dynamic Block Visibility) file. you need to add this to appload Startup Suite\Contents

 

than in tools palettes you need to create a custom button which is a Command Tool and edit the the

command string field macro similer to this picture:-

 

 sdbv.PNG

 

 

in my picture i have a sample dinning-table to insert with 1 or 2 or 3 or 4 legs to choose from as visibility options

firstly inserting my block and right after calling the lisp function (set_dynBlock_visibility "centeral-leg")

with a visibility state to set

 

Note:

1.  my macro insert the block with scale 1x1 but let you specify an angle

2.  if your block has attributes? you need to take care of them in the macro

 

Moshe

 

 

Message 3 of 4
RocksterB
in reply to: Moshe-A

Thanks for the reply. I don't see a lisp attatchment to your comments. Does the lisp provide a pause for the user to provide input for attributes or will the process do this automatically?

Message 4 of 4
Moshe-A
in reply to: RocksterB

hi,

 

I'm sorry, did not notice that the lisp files was not attached (i used IE that actually has problem in attaching files so now i switched to google chrome)

 

No the lisp does not handle the attributes at all it is design to work on the dynamic block right after the block is inserted.

you (as the tool palette designer) should handle the attributes in the Command string field

each backslash '\' will pause the insert letting you to enter a value

 

let's say my block has 3 attributes the macro will look like that:

 

^c^cinsert dinning-table \1 1 0 \\\(set_dynBlock_visibility "centeral-leg")

 

the three bold red backslash '\' will pause 3 times

not that i had correct my macro:

 

1. a ';' char is removed

2. my dinning-table is now inserted at 0 angle (before there was a '\')

 

also note: it is better to set attdia to 0 to prevent attribute dialog to appear

 

 

cheers

moshe

 

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

Post to forums  

Autodesk Design & Make Report

”Boost