Scale before insert of block

Geir Andersen

Usenet Archive
Joined
Oct 26, 2003
Messages
11
Reaction score
0
Is it possible to insert block and see the correct scale before i pick insert point?

This dosent work..
(command "insert" blk.dwg pause 50 50 pause)

It scales after i pick the insertion point..
 
Geir Andersen said:
Is it possible to insert block and see the correct scale before i pick insert point?

This dosent work..
(command "insert" blk.dwg pause 50 50 pause)

You can move and/or scale it immediately after you inserted it. It would be helpful if you told us why you need this function.

Tom Berger
 
I have some blocks which is inserted at diffrent scales, typical is 1/50, 1/100, 1/1 i have a routine which reads dimscale

When the dimscale is 50 the block is inserted at scale 50 The blocks is created at 1/1

I have a button for each block which i have the code
^c^cdrawscl ^c^c(command "-insert" "blck.dwg" pause scale scale pause)

drawscl.lsp reads the dimscale and returns the scale
 
Geir Andersen said:
I have some blocks which is inserted at diffrent scales, typical is 1/50, 1/100, 1/1 i have a routine which reads dimscale

When the dimscale is 50 the block is inserted at scale 50 The blocks is created at 1/1

I have a button for each block which i have the code
^c^cdrawscl ^c^c(command "-insert" "blck.dwg" pause scale scale pause)

drawscl.lsp reads the dimscale and returns the scale

(getvar "dimscale") does the job as well, and so you may use this insert function:

(command "._insert" blockname pause (getvar "dimscale") "" pause)

Tom Berger
 
I have dimscale = 50
But when i insert the block it has a scale 1 until i have placed it in its position, i would like to see the block with scale 50 before i place it..
 
Geir Andersen said:
I have dimscale = 50
But when i insert the block it has a scale 1 until i have placed it in its position, i would like to see the block with scale 50 before i place it..

I already gave you the solution: move the block after you inserted it.

(progn
(command "._insert" blockname '(0 0 0) (getvar "dimscale") "" pause) (command "._move" (entlast) "" '(0 0 0) pause)
)

Tom Berger
 
Thank you both..

RnR said:
What about a routine which inserts the block at the correct scale at 0,0,0 before moving it to the selected location? Something like

(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<file>" pt scl "" "" "" "-move" "p" pause "")

(I'm at home, without AutoCAD nearby, so I'm improvising on the syntax. You may have to make adjustments, but it looks like you know enough to make it work from here.)

http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<blockname>" pt scl "" "" "move" (entlast) "" pt pause)

This works, but im not able to rotate it in place

RnR said:
What about a routine which inserts the block at the correct scale at 0,0,0 before moving it to the selected location? Something like

(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<file>" pt scl "" "" "" "-move" "p" pause "")

(I'm at home, without AutoCAD nearby, so I'm improvising on the syntax. You may have to make adjustments, but it looks like you know enough to make it work from here.)

http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Geir Andersen said:
(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<blockname>" pt scl "" "" "move" (entlast) "" pt pause)

This works, but im not able to rotate it in place

(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert">"<blockname>" pt scl "" "" "move" (entlast) "" pt pause "rotate" (entlast) "" "" pause)

Tom Berger
 
^C^C(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<blockname>" pt scl "" "" "move" (entlast) "" pt pause "rotate" (entlast) "" <lastpoint> pause)

Now i just have to select basepoint for rotating...

Is it possible to store the insertionpoint , like pt2.... Now there is a pause there (setq pt2 (getpoint pt1)) ??? I have tried this but no luck..

Thanks for everything so far :)
 
Geir A said:
^C^C(setq scl (getvar "dimscale")) (setq pt (list 0. 0. 0.)) (command "-insert" "<blockname>" pt scl "" "" "move" (entlast) "" pt pause "rotate" (entlast) "" <lastpoint> pause)

Now i just have to select basepoint for rotating...

use (cdr (assoc 10 (entget (entlast)))) as your basepoint

Tom Berger
 
Back
Top