AnsweredAssumed Answered

Macro to insert note with inline GD&T callout

Question asked by Zhen Wei Tee on Jul 1, 2020
Latest reply on Jul 1, 2020 by Zhen Wei Tee

Is there any way to insert a note with inline GD&T callout using macro? 

 

I am currently exploring the use of macro to create the following note 

 

I did run a quick recording of macro and create the note.  The code showed that the note is created by the following code

Set myNote = Part.InsertNote("NOTES:" + Chr(13) + Chr(10) + _
"<PARA indent=10 findent=0 indentStep=10 number=on ntype=1 nformat=$$. nstartNum=0 numOrder=0 paraSpace=0.001 lineSpace=0.001 flagNote=false flagNoteId=-1 DNSPeriodState=1>LOREM" + Chr(13) + Chr(10) + _
"IPSUM" + Chr(13) + Chr(10) + _
"<OBJECT ID=""11"">")

The code call out for <OBJECT ID=""11""> which i suppose is the invisible GD&T annotation that solidwork created when I insert the GD&T feature through the GD&T UI

 

The macro will only work on the drawing that i create the inline GD&T note manually. 

When used on other drawing, the GD&T will appear as broken link (which is sort of logic since the macro did not create the invisible GD&T feature)...

 

Appreciate if anyone can point me to the correct way/direction of creating the note with inline GD&T feature using macro. 

 

 

Side note: 

The only workaround i found at the moment is to create the note as a notestyle and embedded it into the template which i really want to avoid, i have multiple template and want to avoid updating the template every time I need to make a change to the note template...

(Standard library note did not work due to the GD&T feature and saving the note as block to the library require exploding the block after pulling it out)   

Outcomes