Author Topic: Block scaling in lisp  (Read 3330 times)

0 Members and 1 Guest are viewing this topic.

confusedCADguy

  • Guest
Block scaling in lisp
« on: January 17, 2005, 04:03:20 PM »
I have this crude lisp for inserting a revision triangle which works but I can't see where its going to end up because it gets scaled after I place it.  Is there a way to read the dimscale & scale the block before placing it so I can see where it's going to end up?

BTW the block is at 1:1 so I can read the dimscale and scale it accordingly.


Thanks.

hendie

  • Guest
Block scaling in lisp
« Reply #1 on: January 17, 2005, 04:21:17 PM »
you don't see blocks when inserting through lisp. There are a couple of ways around it though.
You can either cheat and insert the block at 0,0 and immediately follow the insertion with a scale and move command ~ or a better way is to use GRVECS to create an outline of your block so you can see where you are placing it

CADaver

  • Guest
Block scaling in lisp
« Reply #2 on: January 17, 2005, 04:23:41 PM »
Sure, use the "S" modifier prior to picking the insertion point.
In the code below "S" sets the scale to dimscale and "R" set the rotation angle of the block to 0

Code: [Select]
(command ".insert" "G:/colbub" "s" (getvar "dimscale") "r" "0")

confusedCADguy

  • Guest
Block scaling in lisp
« Reply #3 on: January 18, 2005, 11:34:04 AM »
I've tried the the move idea and it will occasionally grab something I don't  want instead of the block.  I don't think GRVECS will work in this situation.  The 'S' modifier looks like it will work.  I'll try it and let you know

confusedCADguy

  • Guest
Block scaling in lisp
« Reply #4 on: January 18, 2005, 11:41:56 AM »
Worked like a charm.  I knew it had to be something simple.  I've been using cad for 10 years and have never used the insert command that way.  Thanks for the help!!

Oh, by the way.  Here is what I used:

    (SETQ REV (GETSTRING "\nRevision Number?"))
    (command "INSERT" "rev" "s" (GETVAR "DIMSCALE") pause "" REV)

Thanks again!!

CADaver

  • Guest
Block scaling in lisp
« Reply #5 on: January 18, 2005, 11:44:40 AM »
Glad to help