Best way to create query

10 posts / 0 new
Last post
#1 Best way to create query

Hey there guys,

 

I think it would be great if we could right click a certain property anywhere in the UI, and have a "Copy query to clipboard" command. I understand it may need a context to work, and that would be fine to work into the command.

Otherwise, I would like a query to accessories and their part numbers to add to text fields on my layout for this part. I may have multiple text fields with individual accessory part numbers, or one text field with a list of all accessory part numbers.

 

Thanks,

Austin

 

Try this

Thanks for posting on the forum.

I understand it may need a context to work...
That's part of the trouble that makes this unintuitive. Also, sometimes queries simply do not exist in some cases.

I would like a query to accessories and their part numbers to add to text fields on my layout for this part. I may have multiple text fields with individual accessory part numbers
We have a feature for that:

  1. Open the layout view of the part
  2. Go to the Drawing tab and select Show component property
  3. Go to the Show tab and select Accessories
  4. Explore the properties of the accessory, select the part number and click OK
  5. Repeat steps 2-4 until all accessory part numbers are shown

Please let us know if this helps.

This is perfect. Thank you!

This is perfect. Thank you!

Thanks for helping me with

Thanks for helping me with the show component property feature. I believe I may have found a bug or am using it wrong.

I go to:
- Select Show Component Property for my disconnect

- Click Show Accessories

- Expand the first one and click the part number field

- Go find the text field dropped by the insertion point.

It contains the top-level component's part number instead of the accessory.

It's a bug

Yip, it's a bug. Thanks for reporting it here!

If you need a workaround, please let us know.

I will take you up on the

I will take you up on the workaround please. I am struggling in the case of getting a single accessory part number when I have multiple accessories on the part.

 

Thanks,

Austin

Try this

Sorry for the late reply.

Try this:

  1. Open the layout of the part
  2. Add a text (via Drawing tab)
  3. Copy/paste the following query into the Value property of the text
    <r:GetParent.GetParent.GetWorkObjects(Class:Accessory;Item:0).PartNumber>

That query will give you the part number of the first accessory listed for the component.
Item:1 will give you the second, Item:2 will give you the third, and so on.

Please let us know if this helps.

This works great, thank you.

This works great, thank you.

Hi there,

Hi there,

 

It seems I am having trouble following these same steps when trying to add an accessory part number query to a custom symbol instead of a layout file. Is it possible to reference the accessory part number on a symbol?

 

Thanks!

Try this...

The data sructure for a symbol in relation to the component it represents is slightly different that for a layout, thus the query is a bit different.

Try this: 

<r:GetParent.GetWorkObject.GetWorkObjects(Class:Accessory;Item:0).PartNumber>

(Notice the first 'GetWorkObject' does not have a 's' at the end, but the second one does.)

Let us know if it works out.