Jump to content

Recommended Posts

Posted

Good day, Just want to ask what would be the simplest way to do create this dynamic block with autolisp, I've created this manually, but another modification is needed to be applied and the data for new said modification is in Excel, I could, perhaps redo it again........ file is provided with a sample of the block, Im also open to suggestion on a way easier method rather than dynamic block, but I would like to learn a way to automate this kind of block. 

image_2022-04-28_140248741.png

image_2022-04-28_140600492.png

SAMPLE.dwg

Posted

You can as part of insert a dynamic block any dynamic block get its visibility state and use a dcl to choose. The dcl is based around lee-mac get dynamicblock properties.lsp and Populating a dcl.

 

Whilst my Multi radio buttons may work the nearly 30 as radio buttons is pushing the limits, using a list box would be easier as you can scroll long lists.

 

This is a window dynamic block.

 

image.png.294b1eb0a00703a1de5a457158093dce.png

 

If you want to go this way just post.

 

 

Posted (edited)

Hello, Sorry for not responding for a long time, Thankyou for your suggestion, but I think its kind of complex to code this dcl and I would like to look into it further and learn in the future but for now, I have resolve the problem. the only thing is I cant seem to figure out is to create a parameter and dont have to manually select it in the code provided below 

 

(setq								;start of point setting
    bpt-ld1		'(2.0 5.0 0.0)
	bpt-ld2		'(4.0 5.0 0.0)
	bpt-ld3		'(3.0 5.5 0.0)
	bpt-d1-b1	'(3.0 10.0 0.0)
	bpt-d1-b2	'(12.5 2.0 0.0)
  ) 								;end of point setting

(command "BPARAMETER" "L" bpt-ld1 bpt-ld2 bpt-ld3 "2") 			;-creating Linear Parameter

;(setq ent-parameter (entlast)) 							;-assigning the parameter

(command "BACTIONTOOL" "ST" (ENTSEL) bpt-ld2 bpt-d1-b1 bpt-d1-b2 ssgb allpara "")	;adding action to parameter

 

Ill try to explain as clear as I can 

 

this said code is in block editor, as you can identify in this example, instead of inputting  ent-parameter string, I instead use (ENTSEL), 

 

Ive even tried ssget "w"  (windowed said parameter) that yield 3 items including the grip and tried all of the said ent with (ssname 0/1/2 ssgetlist) But still yielded "Select Parameter"

 

If anyone know how I can remove the entsel that would be nice, but regardless I resolve the problem

 

Thankyou for the response.

 

 

 

 

 

Edited by phjlc
correcting grammar

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