SW2009 SP3.0
Windows XP x64
It seems as though the implementation of this is half-baked in SWand in the API. For instance, inside SW I can create a selectioncriteria such as this:
Select all parts where I have write access to the files.
In the 'Define Search Criteria' tab of the 'Advanced ComponentSeelction' dialog this criteria looks like this:
The API method to get a criteria item is:
Function GetItem( _
ByVal Index As Integer, _
ByRef Property As String, _
ByRef Condition As Integer, _
ByRef Value As String, _
ByRef IsAnd As Boolean _
) As Integer
What is returned for the criteria above looks like this:
What the heck?
Did Category 2 get added at some point and the API folks forgot todeal with it?
Problem #2:
The 'Export Criteria' button opens a save dialog where the 'Save Astype:' drop down contains 'SW Component Query Criteria (*.xml)' andone or more other types with random garbage text as shown in theattached image.
Problem #3:
If I select XML as the export file type for the criteria describedabove, the XML file that is output is essentailly empty. Thecontents are as follows:
However, if I check the check box in the 'Add to favorites' columnand then export, I get actual content in the XML file. The contenteven includes enough data to properly handle the Category2information in the criteria.
Jim S.
SolidworksApi macros
Windows XP x64
It seems as though the implementation of this is half-baked in SWand in the API. For instance, inside SW I can create a selectioncriteria such as this:
Select all parts where I have write access to the files.
In the 'Define Search Criteria' tab of the 'Advanced ComponentSeelction' dialog this criteria looks like this:
And/Or Category 1 Category 2 Condition Value
----------------------------------------------------------------------
File Status Write Access is yes
The API method to get a criteria item is:
Function GetItem( _
ByVal Index As Integer, _
ByRef Property As String, _
ByRef Condition As Integer, _
ByRef Value As String, _
ByRef IsAnd As Boolean _
) As Integer
What is returned for the criteria above looks like this:
Property Condition Value IsAnd
---------------------------------------------------------------
File Status And is yes False
What the heck?
Did Category 2 get added at some point and the API folks forgot todeal with it?
Problem #2:
The 'Export Criteria' button opens a save dialog where the 'Save Astype:' drop down contains 'SW Component Query Criteria (*.xml)' andone or more other types with random garbage text as shown in theattached image.
Problem #3:
If I select XML as the export file type for the criteria describedabove, the XML file that is output is essentailly empty. Thecontents are as follows:
However, if I check the check box in the 'Add to favorites' columnand then export, I get actual content in the XML file. The contenteven includes enough data to properly handle the Category2information in the criteria.
Jim S.
SolidworksApi macros