TurboCAD Forums

SDK Corner => Sample SDK Projects => SDK General Discussion => Topic started by: grimbot on September 15, 2018, 02:34:10 AM

Title: Replace one block with another
Post by: grimbot on September 15, 2018, 02:34:10 AM
Say i have a single block in a drawing how can i change which block it refers to. You can do it manually by opening up the properties dialog of the block and clicking the replace with button. This changes the block but keeps the scale,position,angle the same.

or if you can't change the block is there a way to retrieve the scaling,rotation,position values so i can delete and insert a new one?
Title: Re: Replace one block with another
Post by: nikkipollard on September 15, 2018, 07:26:18 AM
You can use the paint brush if you have another one in the drawing and you want to match it exactly.
 Or the SI palette under metrics but you have to look for the block name which can be painful it there are a lot of them.
 
Title: Re: Replace one block with another
Post by: John R on September 15, 2018, 12:15:13 PM
re: …is there a way to retrieve the scaling,rotation,position values…

In the Selection Info palette, click on the "Copy" icon in the palette toolbar when the Block is selected. This will open a temporary webpage in your browser that contains all the info for that selected object.
Title: Re: Replace one block with another
Post by: grimbot on September 15, 2018, 09:42:26 PM
Thanks for the reply's i was hoping for a property or something that i could read similar to a brush style

block.Properties("BrushStyle").value

i tried to use the macro recorder to find it but when ever you change one of the values it says

'Sorry, recording of changing this property(-ies)
'is not supported by current version.
Title: Re: Replace one block with another
Post by: nikkipollard on September 15, 2018, 11:55:39 PM
Try the macro recorder and the selection info palette I got something like this
Title: Re: Replace one block with another
Post by: grimbot on September 17, 2018, 04:57:07 PM
thanks that got what i needed