Guest balajibth84 Posted October 17, 2010 Share Posted October 17, 2010 Hai Barry Here Balaji. I have Shortcut for Blocks insert.We are using more blocks.Now i want insert the blocks using Shortcuts Lisp means Its asking X scale factor Y scale factor And Rotaion Angle. So in my Lisp I want to add: X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. So in below mentioned Shorts Cuts How to include this Scale Factor and Rotation Angle Values?Please Help me. (defun c:T506() (command "_Insert" "T506" )) (defun c:T656() (command "_Insert" "T656" )) (defun c:T756() (command "_Insert" "T756" )) And One more thing.. We are Using So many blocks More than 350..Now i want create that black short means each and every time i want paste this code.. (defun c:XXXX() (command "_Insert" "XXXX" )) If its possible i want update latest updation to that single place.Like that lisp having some adding the next block list means easily i will add that..Like T506 Blocname--->ShortCut Command is T506 T500 Blocname--->ShortCut Command is T500 T600 Blocname--->ShortCut Command is T600 What ever in Block name directly i want use that name in command line means its need to insert...With Astual Size.So i want X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. I am waiting for your hopeful reply Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted October 17, 2010 Share Posted October 17, 2010 Try to analyze "-insert" command and add missing sequences to lisp code (command "_Insert" "XXXX" )) How many "cad" people work in your company? Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 (edited) Try to analyze "-insert" command and add missing sequences to lisp code (command "_Insert" "XXXX" ))How many "cad" people work in your company? Hai MdbDesign i have tried .But its not working.See the below mentioned Code.And I want to Give that X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. (defun c:T506() (command "_Insert" "XXXX" )) And i want update in same lisp with block name means its need to read.So how to Create code for that.Like in Lisp Code having the List of block means Upcoming Block i will easily Add to that list as per the Block name.What ever block name i mentioned i want to use that name directly to cad command line pallate and i want to insert.So here i want to give and fix the below value. X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. In my company 45 Are Peoples are working.Why mdbdesign? Edited October 18, 2010 by balajibth84 Missed to Update Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Till now i cannt able to fix that X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. So plz Fix this Value.For All Blocks... While adding the Block till now i am paste that code and editing like below mentioned (defun c:T506() (command "-Insert" "T506" "XXXX" )) (defun c:T656() (command "-Insert" "T656" "XXXX" )) (defun c:T756() (command "-Insert" "T756" "XXXX" )) Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted October 18, 2010 Share Posted October 18, 2010 Everything is working: GO step by step and add missing part of code to main code. Example: Command: -insert Enter block name or [?] : ;HIT ENTER Units: Inches Conversion: 1.00000000 Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]: ;PICK INSERT POINT, NEED TO INTERRUPT CODE TO ADD USER INPUT Enter X scale factor, specify opposite corner, or [Corner/XYZ] : ;HIT ENTER TO CONFORM SCALE X Enter Y scale factor : ;HIT ENTER TO CONFORM SCALE Y Specify rotation angle : ;HIT ENTER TO CONFORM ROTATION DEFAULT 0 DEG now try to update your code. In my company 45 Are Peoples are working.Why mdbdesign? How many of them is lisp capable? Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Everything is working:GO step by step and add missing part of code to main code. Example: Command: -insert Enter block name or [?] : ;HIT ENTER Units: Inches Conversion: 1.00000000 Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]: ;PICK INSERT POINT, NEED TO INTERRUPT CODE TO ADD USER INPUT Enter X scale factor, specify opposite corner, or [Corner/XYZ] : ;HIT ENTER TO CONFORM SCALE X Enter Y scale factor : ;HIT ENTER TO CONFORM SCALE Y Specify rotation angle : ;HIT ENTER TO CONFORM ROTATION DEFAULT 0 DEG now try to update your code. How many of them is lisp capable? Ya its working Good.With Out Insert Command We can INsert?Like i want insert T506 means Directly i want Give the Command is T506.Is it Possible??? Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Till now its asking the X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. as per #25 Thread..Each and every time i want to give Enter??Just i want to mention T506 and I am selecting pick point means its need to Place.So i want to Fix the Default Value is X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. And directly i want access with the Block name.Just in open command line pallete i am given T506 means its need to ask picjk point aftr i am selecting the pick point means its automatically need to place with that above mentioned X,Y Scale Factor and Rotation Angle(0)...So is it possible??Bcoz we r working with So many block. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted October 18, 2010 Share Posted October 18, 2010 Did you get complete code? Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Did you get complete code? No...where its? Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted October 18, 2010 Share Posted October 18, 2010 No...where its? I mind: did you write code yet? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted October 18, 2010 Share Posted October 18, 2010 So i want to Fix the Default Value is X scale factor is 1 Y scale factor is 1 and Rotation Angle is 0. And directly i want access with the Block name.Just in open command line palette i am given T506 means its need to ask picjk point aftr i am selecting the pick point means its automatically need to place with that above mentioned X,Y Scale Factor and Rotation Angle(0)...So is it possible??Bcoz we r working with So many block. Balaji, you have two options: 1) If you're using a tool palette (as suggested), simply right click the block in the palette (T506 for example), and select Properties. From the you can specify the block scale, and rotation, among many other options. 2) If you insist on writing LISP code for your hundreds of blocks, then perhaps explicitly declaring the value is prudent, example: (command "._-insert" "T506" pause 1 1 0) Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Actuall as per this Continue Thread i got some good Level Lisp..Please see this top thread #25.So i want update that Code as per my #27 th thread.... Quote Link to comment Share on other sites More sharing options...
Guest balajibth84 Posted October 18, 2010 Share Posted October 18, 2010 Hai i have tried below code. (defun c:T506() (command "._-insert" "T506" pause 1 1 0) But error is coming..."Command: ; error: malformed list on input" Quote Link to comment Share on other sites More sharing options...
BlackBox Posted October 18, 2010 Share Posted October 18, 2010 Hai i have tried below code. (defun c:T506() (command "._-insert" "T506" pause 1 1 0) But error is coming..."Command: ; error: malformed list on input" Instead, try this: (defun c:T506 () (command "._-insert" "T506" pause 1 1 0) (princ)[b][color=red])[/color][/b] Note - This code assumes that your block resides within one of the included support paths. If not, this too will error out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.