AnsweredAssumed Answered

Make a Macrofeature Comserver easier for solidworks to find

Question asked by Jacob Corder on Feb 7, 2018
Latest reply on Feb 13, 2018 by Jacob Corder

I am wondering if anyone could help me figure one thing out regarding macrofeatures.

I have a comserver as a separate dll. It is written in and implements ISwComFeature.

I separated it out of my addin to try to make it faster to instantiate for solidworks.


I have a full design suite that automates tons of our work.

The macrofeatures are direct representations of our machine shops tool library, they are sketchless. They guarantee a model that matches exactly what will be done after machining.


So on to the question.

I have a 500 feature block that rebuilds in roughly 9 seconds. The time my comserver takes to execute it's portion of the code is 3 seconds. Solidworks is taking 6 seconds.  I have found that alot of the time is spent finding my comserver through the registry.



How can I make my comserver faster to be found for solidworks?


I have added a key in solidworks xxxx macrofeatures but this didn't help much.  I see through process monitor(sysinternals) that it is calling alot of registry checks to get the comserver file name.

I could add it to the GAC or add the comserver to the soldworks running folder to utilize Side-by-side.

The problem is I have to move hundreds of thousands of lines of code which should be done anyway to put the dll in the solidworks running folder.


Any suggestions would be helpful.


This is basic com stuff here so any comserver registration optimizations will apply as solidworks is calling basic createobject stuff.