Preview | SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
MTMark Treadwell08/01/2007
The short and sweet version of my question:
-How to access "Make Drawing from Part" through theAPI?
-If nobody knows how to do that, then my alternative is to try andget the same functionality through a series of equivalent commands,for which I need to figure out:
-What is the ID for the View Palette taskpane, and how do Iinteract with it once I've activated it?
-How do I "preload" a new document with a filename,without actually saving it?
The long version:
I'm modifying a macro we use to find the drawings associated with apart; the macro looks for drawing files named using the partnumber, from a custom property. I'd like to add code so thatif no drawing exists, the macro will automatically create one. The "file/make drawing from part" command doesexactly what I want, but I can't find any documentation saying howto access it from the API. I've tried recording, but all itshows is NewDocument.
Since that didn't work, I tried to reverse engineer the samefunctionality (open the View Palette taskpane, load views for thepart, and give the drawing a tentative filename based on the partfilename); however, I can't find an ID for the View Palette pane,and if I could I wouldn't know how to load a part there (recordinga macro doesn't show anything happening). I'm also not surehow to get the drawing to "preload" with a filenamederived from the part or some other source. I suspect most ofwhat I want can be obtained by making the new drawing associateitself with the part somehow but I'm not quite sure how to do that,other than by inserting a view (which I don't want the macro todo)...
Thanks in advance,
-Mark
-How to access "Make Drawing from Part" through theAPI?
-If nobody knows how to do that, then my alternative is to try andget the same functionality through a series of equivalent commands,for which I need to figure out:
-What is the ID for the View Palette taskpane, and how do Iinteract with it once I've activated it?
-How do I "preload" a new document with a filename,without actually saving it?
The long version:
I'm modifying a macro we use to find the drawings associated with apart; the macro looks for drawing files named using the partnumber, from a custom property. I'd like to add code so thatif no drawing exists, the macro will automatically create one. The "file/make drawing from part" command doesexactly what I want, but I can't find any documentation saying howto access it from the API. I've tried recording, but all itshows is NewDocument.
Since that didn't work, I tried to reverse engineer the samefunctionality (open the View Palette taskpane, load views for thepart, and give the drawing a tentative filename based on the partfilename); however, I can't find an ID for the View Palette pane,and if I could I wouldn't know how to load a part there (recordinga macro doesn't show anything happening). I'm also not surehow to get the drawing to "preload" with a filenamederived from the part or some other source. I suspect most ofwhat I want can be obtained by making the new drawing associateitself with the part somehow but I'm not quite sure how to do that,other than by inserting a view (which I don't want the macro todo)...
Thanks in advance,
-Mark