![]() |
【转帖】run once
run once
hi please advise if it is possible for a macro to be run once only.the attached macro scales the part by enlargening it by 1%.the scale function is renamed to shrinkage0.1 in the tree.is it possible for the macro to check the tree first if "shrinkage0.1 is already there? if "shrinkage0.1" is in the tree then could some code be added to say that the macro has been run already by means of a msgbox. thank you feroz mahomed windows xp professional sp2 sworks 2009 sp2 nvidia quadro fx1500 hi feroz, you coud use featuremanager::isnameused to know if the feature already exist. simone simone, thank you for the response. do you have an example of how i could do this? please note that i don't have any programming experience. feroz mahomed windows xp professional sp2 sworks 2009 sp2 nvidia quadro fx1500 hi feroz, i don't have any example, anyway it's very simple: - get the feature manager object by the document modeldoc2::featuremanager - call the method featuremanager::isnameused that returns true if already exist a feature with the name searched. i don't know your situation, anyway you can retrive the document object (modeldoc2) by many ways: from solidworks by activedoc, from a component, ecc... simone simone, as stated previously, i don't have any vb programming knowledge.i usually modify example simple api files to suit my needs. feroz mahomed windows xp professional sp2 sworks 2009 sp2 nvidia quadro fx1500 quick |
所有的时间均为北京时间。 现在的时间是 11:00 AM. |