TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

Assign macro to a button
Read 4467 times
* January 31, 2013, 05:58:21 AM
I have a macro I would like to assign to a button and put on a toolbar. Ideas?

Logged
V 11.2 Professional Win xP


January 31, 2013, 06:11:12 AM
#1
I'm pretty sure that is "Transform Recorder" in your manual

Logged
Running  Ver 16.1 Pro Platinum


* January 31, 2013, 06:29:50 AM
#2
Let me look .......


Hummmm. There is a transform recorder but it is different than the macro recorder. Can see no way to add the recorded transform to a button and then put that button to a menu either.


Perhaps this is needing a custom dll project using the methods in the SDK. I can do that kind of software programming,  but if there was a simpler way, then I would prefer to use it. Why reinvent the wheel, so I am just trying to see if there is a wheel in the first place!

See

http://www3.turbocadcommunity.com/tiki-index.php?page=VB6+Tool+Step+By+Step
« Last Edit: January 31, 2013, 06:37:12 AM by 3acorns »

Logged
V 11.2 Professional Win xP


* January 31, 2013, 10:51:37 AM
#3
I have a macro I would like to assign to a button and put on a toolbar. Ideas?
Seems like more time than I have.It would be easier to operate from macro palette and save the macro file.Unless use the macro over and over and over!!Like hundreds of times

Logged
Even a mistake may turn out to be the one thing necessary to a worthwhile achievement Henry Ford
If I have ever made any valuable discoveries it has been owing more to patient attention than to any other talent Isaac Newton
I have not failed Ive just found 10,000 ways that won't work Thomas Edison


* January 31, 2013, 12:36:40 PM
#4
Yup- I end up doing this hundreds of times in a drawing and it is a real pain. And Yup it looks like doing the VB coding and DLL creation etc is a going to take a lot of time. Sure would be good if there was a way witin the regular interface.

I am doing some drawing. I need a leader. I have 2 choices.

#1
Draw the leader and then take a look at it in relation to the object that is being annotated, and see too small text and too small arrowhead and its too short offset, etc etc. and, roll my eyes , then go to the properties button ( a button that is internally assigned a "macro" in the TC code)

Then have to click it, have to click thru and set all the proper values. Close the dialog, see that I forgot a setting. Redo from start. etc.

Realize that the reason it is not the right format is cause it is using the sticky format from the last used leader which was for a different view.

OR

#2
I can try and remember what looks good and before drawing the leader go to the properties and set everything up. Then draw the object. See that it needs tweaking. Redo properties modification.

Realize and then forget 20 min later that the leader command is sticky and therefore when I draw the next set of leader objects which need to be formatted different that they will be off and which will require me to modify things again.

OR

#3
I can create a macro that will work on user selected leader(s) to reformat the text size to 1", the arrow to 4", the extension to 1", etc. Then I can put in leaders wherever and in whatever format I want, not being concerned about formatting right now. Then, as I am cleaning up my project, or finished up my annotation session, select all the items I want formated alike and then run my macro on it which does not make me go to the properties dialpgs and click thut them to change anything.

I make a number of these macros. BUT I have to go thru the hassle of navigating via the macro palette to get to them, and every time I want to use a different one I have to navigate thru them all again.

After all this I then think, Dude, I need a way to put the my macros to a custom button (just like excel will allow a custom bacro to be assigned a button adn placed on a toolbar) so I can have one click command execution.





 




I have to use the text and arrow and leader formatting over and over and over. It is a real pain to spot a piece of leader that is formatted wrong.
« Last Edit: January 31, 2013, 12:39:03 PM by 3acorns »

Logged
V 11.2 Professional Win xP


* February 01, 2013, 12:58:47 AM
#5
You can create presets for different leader arrows then just select them from the drop down list.

Being able to add macros to custom buttons would be great

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* February 01, 2013, 06:01:01 AM
#6
Niko - I guess based on the comments here I should check out upgrading my tc

Logged
V 11.2 Professional Win xP


* February 01, 2013, 12:11:00 PM
#7
3acorns,

Look in your V11 Help under "User Interface / Object Properties / Styles". In version 16 they changed "Styles" to "Property Value Presets". A very useful tool.

Logged
John R.

V17—V21, 2015—2018
Designer, Deluxe, Expert, Basic, Platinum
RedSDK enabled
Windows 10, 64-bit


* February 02, 2013, 09:12:01 AM
#8
You can create presets for different leader arrows then just select them from the drop down list.

Being able to add macros to custom buttons would be great

Nikki

What versioin are you using to do this. What is the command? How do you create presets. Could you send a screen shot of your dialog box where you make your presets.

Thanks

Logged
V 11.2 Professional Win xP


February 02, 2013, 11:48:32 AM
#9
Quote
#3
I can create a macro that will work on user selected leader(s) to reformat the text size to 1", the arrow to 4", the extension to 1", etc. Then I can put in leaders wherever and in whatever format I want, not being concerned about formatting right now. Then, as I am cleaning up my project, or finished up my annotation session, select all the items I want formated alike and then run my macro on it which does not make me go to the properties dialpgs and click thut them to change anything.

How about this:
Open a new drawing; Establish the parameters you like whether it's leaders, units & tolerances, number of  and   colors of layers, grid features  yadda yadda yadda till the cows come home to roost and lay eggs.

Then save that drawing as a TEMPLATE.
Then when you think you want those pre set features you just open that template.   And POOF & WHAMMO the drawing fairy will have your drawing already set up and ready to go.

You can a variety of templates.

Logged
Running  Ver 16.1 Pro Platinum


* February 02, 2013, 03:07:13 PM
#10
Cliff

Cool idea , and I also use a fake out trick regarding blocks. I have a master blocks set applicable to a variety of projects. As I drag blocks into the drawing, I also place them in their own on drawing corral a bit off to the side in the drawing, of to the side. then as I need blocks I just go there to grab and stamp to where I need it, or of course grab one from a location on the drawing where I know I have inserted one before. I also have wiped the drawing all except for the block corral and then use that as my "Startup Drawing". The procedure saves me having to call up the block pallette and scroll arounr thru 1300 blocks to find the one I need. Essentially it is a way of grouping my "most used"  blocks into an area that is fast and easy to get to.


IN other news -----  I just found out that the macro recorder will not allow certain actions to be recorded BUT that it will allow recording of  what I need regarding dimension and leader styles. I am constantly drawing different styled leaders ( 3" arrowhed, 12 point text, etc, 1" arrow, .5 inch text, etc. ) according to what components I am detailing, and every time I go to draw a leader, its preset assigned to the button on my tool bar always seems set to the last (wrong) one and I have to go find  a leader I like and then look ant the properties and then reset the global leader style items to what I want all before I draw the desired leader.  (Maybe the later versions of TC past 11 have leader styles but my Ver 11 does not.)

Now I just run a macro to change the leader and dimsetup .. And my template drawing has all the example styles in the corral, with an tag around their neck that says hey if you want leaders that look like this them run this macro.

I attach a screen shot and also a macro ( change the ext to tcr)

I wish the format painter worked on leaders and dims, but it also changes the text attribute of the target to whatever the soruce was and that is not what is wanted.


Logged
V 11.2 Professional Win xP


* February 03, 2013, 07:56:17 PM
#11

The styles you are looking for arent found in the style manager
Right click, then click on properties you should see a box that says normal dimensions.
Type a new name for your arrow settings click on new.  The next time you change your arrow settings create a new style(preset) by giving it a name first.
When you want to go back to the previous arrow type then you can use the drop down menu under properties to find it. You can add the drop down list to your menu, its found under property controls.
You can create presets for most commands - Its a fantastic feature.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* February 04, 2013, 07:20:48 AM
#12
Nikkipollard

What version are you referring to?

Thanks

Logged
V 11.2 Professional Win xP


* February 04, 2013, 10:23:18 PM
#13
I dont think this is a new thing.
My first copy of Turbocad was version 10. I cant check because I dont have it on my computer anymore.
But I do have the tutorials for 10 on my computer. When I look at the setup of the menu on the tutorial the
drop down list for presets (styles) is next to the layer control box which makes me presume that you will have this in 11.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* February 19, 2013, 04:11:56 AM
#14
Nikki

just getting back to you to thank you for your instruction on creating the styles. They are very useful now.

I also see that the styles are embedded in the drawing so if you are creating off a template that has not been set up with the styles then you have to grab them off another drawing.

This feature does have a benefit in that I got a ACAD drawing from a contractor and they had their line and dimension styles already set up and I was able to get a bunch of style templates to now use in my other drawings. (Why reinvent the wheel???) Some of their style setups were interesting and useful.

Logged
V 11.2 Professional Win xP