BLOACH85 Posted January 27, 2009 Author Share Posted January 27, 2009 Well i really hope thats the case and i havent wasted your time. Quote Link to comment Share on other sites More sharing options...
BLOACH85 Posted January 27, 2009 Author Share Posted January 27, 2009 I found this @ http://www.cadtutor.net/forum/archive/index.php/t-6684.html but it scales a block not a vla object would it work? ;; Match Block ;; Matches properties from doner block to selected blocks ;; Properties include x,y,z scale factor, rotation, color, layer, ;; linetype, and linetypescale (defun c:mb (/ srcblk ensel srcobj prop blkobj blk color linetype rotation x-scale y-scale z-scale layer linetypescale lineweight plotstylename ) (if (setq srcblk (car (entsel "\nSelect source block: "))) (setq srcobj (vlax-ename->vla-object srcblk) x-scale (vla-get-xscalefactor srcobj) y-scale (vla-get-yscalefactor srcobj) z-scale (vla-get-zscalefactor srcobj) rotation (vla-get-rotation srcobj) color (vla-get-color srcobj) linetype (vla-get-linetype srcobj) layer (vla-get-layer srcobj) linetypescale (vla-get-linetypescale srcobj) lineweight (vla-get-lineweight srcobj) ) ) (while (progn (prompt "\nSelect destination block: ") (setq blk (ssget "+.:E:S")) ) (setq blkobj (vlax-ename->vla-object (ssname blk 0))) (prompt "\*** Got one. ***") (vla-put-xscalefactor blkobj x-scale) (vla-put-yscalefactor blkobj y-scale) (vla-put-zscalefactor blkobj z-scale) (vla-put-rotation blkobj rotation) (vla-put-Color blkobj color) (vla-put-Linetype blkobj linetype) (vla-put-layer blkobj layer) (vla-put-linetypescale blkobj linetypescale) (vla-put-lineweight blkobj lineweight) ) (princ) ) (prompt "\*** Match Block Loaded, Enter MB to run. ***") (princ) Quote Link to comment Share on other sites More sharing options...
BLOACH85 Posted January 27, 2009 Author Share Posted January 27, 2009 I use Annotative object scale on every drawing. so if i have a current scale set why could we not use (setq tb(vlax-ename->vla-object(car(entsel)))) (vla-get-XEffectiveScaleFactor 'tb) (vla-get-XScaleFactor 'tb) (vla-set-XEffectiveScaleFactor 'tb) (vla-set-XScaleFactor 'tb) Quote Link to comment Share on other sites More sharing options...
BLOACH85 Posted January 27, 2009 Author Share Posted January 27, 2009 ok so apparently the vla-set commands on my last post do not exists so....back to step 1 i guess Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 27, 2009 Share Posted January 27, 2009 vla-set-...xxx does not exist I don't think, the opposite of vla-get is vla-put So maybe something like: vla-put-XScaleFactor... Quote Link to comment Share on other sites More sharing options...
fixo Posted January 27, 2009 Share Posted January 27, 2009 vla-set-...xxx does not exist I don't think, the opposite of vla-get is vla-put So maybe something like: vla-put-XScaleFactor... If you need to scale this table uniformly try the following one: (setq pt (getpoint "\nSpecify base point: ") dblscale (getreal "\nSpecify scale factor: ") ) (vla-scaleentity tb (vlax-3d-point pt) dblscale) ~'J'~ Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 27, 2009 Share Posted January 27, 2009 Thanks Fixo, but would my method work? *Just Curious* Quote Link to comment Share on other sites More sharing options...
fixo Posted January 27, 2009 Share Posted January 27, 2009 Ok, buddy Type (vl-load-com) in the command line then Open VLIDE and then type vla-put-xscalefactor there then select it and press "Apropos" button (red "(A)" in main menu) and you will be happy From help: vla-put-xscalefactor Specifies the X scale factor for the block or external reference (xref). ~'J'~ Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 27, 2009 Share Posted January 27, 2009 Thanks Fixo Quote Link to comment Share on other sites More sharing options...
fixo Posted January 27, 2009 Share Posted January 27, 2009 You're quite welcome Hint I think your sharp brain is ready to learn C++/ObjectARX at the same time, trust me Try start ~'J'~ Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 27, 2009 Share Posted January 27, 2009 Thank you for your kind words Fixo, I just don't want to confuse myself Do you think C++/Object ARX is the way to go, or should I perhaps try to learn Java? Quote Link to comment Share on other sites More sharing options...
fixo Posted January 27, 2009 Share Posted January 27, 2009 I don't know, sorry Ask about the big brothers from this forum, say TT or MP or LE ~'J'~ 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.