TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Remember to do a search before you ask a question!!!

database issue
Read 1086 times
* September 26, 2018, 05:06:04 PM
I'm new to the database feature.
I create the fields I want to use  (part number, assembly, vendor, etc), then I attach the fields to the custom properties of a block and fill in the appropriate values.
When I insert the block the custom properties are blank.
When I edit content (from the blocks toolbar), the custom properties are there.
If I attach custom properties to the block I've just inserted, I can copy the block w/o losing the properties.
I'm sure I'm missing something...
Can anyone tell me what box needs to be checked so the custom properties follow the block when I insert it?
(I played with block attributes, checking "constant", for example, so I'm assuming there might be a similar switch for custom properties).

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 26, 2018, 10:21:37 PM
#1
For blocks I prefer to use block attributes. They work the way I think you want custom properties to work.
 i.e.: They stay there.
  https://turbocaddoc.atlassian.net/wiki/spaces/TG/pages/174692310/Block+Attributes

You may also want to look at the Database connection palette for a more efficient way to add work with both types of data
 It can save lots of time.
some advantages:
Custom properties and Block attributes can be changed for multiple items at once.
You would  also have predefined lists - which you add to as you need them.
 
https://turbocaddoc.atlassian.net/wiki/spaces/T2UG/pages/100925695/Database+Connection+Palette

« Last Edit: September 26, 2018, 10:48:50 PM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* September 27, 2018, 06:38:38 AM
#2
Thank you, Nikki, for the response.
Disappointed that there is apparently no 'switch' to make custom properties 'stay there' when I insert a block.
However, block attributes may accomplish my goal, which is simply discovering how many of what kind of fastener (in this case) my contraption requires.  I hadn't examined the 'multiple properties' aspect of block attributes; this may suffice for my limited requirement.
I've not played with the connection pallet at all; a quick reading of the user guide page doesn't tell me how the data is formatted to 'attach' to the object in the drawing.  I'm imagining a spreadsheet, for example, with columns like 'head-type', 'thread', 'length', etc.  Would I define a block, say a "SHBH 1/4-20 x 1", open the connection pallet, then assign a key field to the block?  Can you point me to a discussion of the connection pallet that might help me see more clearly how it's used?

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 27, 2018, 07:38:01 AM
#3
With some tools you can set presets for the custom properties and they stick to what you are drawing. But if you edit the object the custom properties disappear. - all that effort gone.
You cant  preset properties for blocks , you need to change the properties once the block is in the drawing. That is why your custom properties aren't following through.
Block attributes on the other hand are a part of the block - so they don't disappear and if they do you can use the sync tool in the block palette to bring them back. They have the same functionality as  custom properties. In the long run they are easier to use.
 I would create a few standard ones and drag them to a library folder each time you create a block ,that you will need to extract information from in the future.
Drag the attributes onto the drawing and explode once so that they are no longer a group edit them and include them when you define the block.
You only need the database connect palette if you are likely to change the attributes or custom properties.
and Yes  the database connection palette uses an external data source. The easiest way to create one is to select a table in your drawing with the the right headings and data you would need (you can add to that later). With the table edit tool click on save as and change to a microsoft access (.mdb)file type . Follow the link set up as described in the help file.
« Last Edit: September 27, 2018, 07:44:26 AM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* September 27, 2018, 10:10:46 AM
#4
Thanks again, Nikki.  Defining multiple block attributes provides me the data a need.  Also forces me to create a "fasteners" drawing, with blocks to copy into any other drawing.
I exported a table with one row of data, added a row for a different block, but had no luck linking to the external data source via connection palette: DSN architecture mismatch error.  This is apparently due to 32 and 64 bit drivers and sources conflict, according to a few quick hits I found quickly.
Maybe someday I'll sort that out...

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 27, 2018, 12:47:38 PM
#5
I'm new to the database feature.
I create the fields I want to use  (part number, assembly, vendor, etc), then I attach the fields to the custom properties of a block and fill in the appropriate values.
When I insert the block the custom properties are blank.
When I edit content (from the blocks toolbar), the custom properties are there.
If I attach custom properties to the block I've just inserted, I can copy the block w/o losing the properties.
I'm sure I'm missing something...
Can anyone tell me what box needs to be checked so the custom properties follow the block when I insert it?
(I played with block attributes, checking "constant", for example, so I'm assuming there might be a similar switch for custom properties).



Database report will display a Blocks custom properties via the advanced report.
To expose a block‚Äôs custom properties in the drawing window select the block and hit ctrl+space or (rt click local menu edit tool) then  go to custom  properties then finish block editmode (in local menu)
Database connect in TC 64 bit you need to install 64 bit office products.
« Last Edit: September 27, 2018, 12:53:04 PM by Dean »

Logged
"What do I know, I'm still learning"..
Windows 7 64 bit HP > on a stock HP laptop with 4gb-2.4 GHz.Turbocad 2018-2017, TurboCad Platinum 21.Using Lightworks and Redsdk, Anilab lab 5. ATI Mobility Radeon HD 4500/5100


* September 27, 2018, 02:53:43 PM
#6
Thanks Dean, for your input, and for confirming that the architecture mismatch is 32/64 bit issue.
I had no problem reporting a block's custom properties.  The issue was that they don't 'stick' to the block when it's inserted.  They copy with the block when it's copied, but they don't insert with the block when it's inserted.
But block attributes do 'stick' when block is inserted, plus they are accessible as fields in database report, so they provide me with two ways to get the data.

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 27, 2018, 03:21:55 PM
#7
Thanks Dean, for your input, and for confirming that the architecture mismatch is 32/64 bit issue.
I had no problem reporting a block's custom properties.  The issue was that they don't 'stick' to the block when it's inserted.  They copy with the block when it's copied, but they don't insert with the block when it's inserted.
But block attributes do 'stick' when block is inserted, plus they are accessible as fields in database report, so they provide me with two ways to get the data.

I understand attributes and all that stuff but the custom properties do "stick to the block when inserting.
you need to expose them by selecting the block hit Ctrl+space then select block hit Ctrl+f (properties) you should see them.
I think it makes more sense this way maintaining the integrity of the block.
Years ago doing Cad if a block was altered in any way from its original design a new block under a new name was created.

Logged
"What do I know, I'm still learning"..
Windows 7 64 bit HP > on a stock HP laptop with 4gb-2.4 GHz.Turbocad 2018-2017, TurboCad Platinum 21.Using Lightworks and Redsdk, Anilab lab 5. ATI Mobility Radeon HD 4500/5100


* September 27, 2018, 04:09:05 PM
#8
Thanks Dean, for your follow up; I will try the ctrl space key stroke.  When I selected the newly inserted block and hit ctrl-f earlier, the custom attributes table was blank; also blank when I double-clicked on the newly inserted block to open properties.  I'll take another look at it because it made no sense to me for those custom properties to disappear on insertion.

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 27, 2018, 10:24:46 PM
#9
Hi dean is it possible to post a video.
 I don't really understand how this works. I have always added custom properties after the block was created. Which means that the block was defined first. So how does the block TC know which custom properties to use when you drag in from the block palette?
It sound useful though.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* September 27, 2018, 10:53:54 PM
#10
Forget the video I reread your post and I think understand what you are doing -  you are applying the custom data to the contents of the block not the block as a single item.
Just a few questions.
How do you extract the custom data when it is hidden in the block? I have tried a few combinations of settings in the advanced report with no success.
What happens when there are lots of components in the block and you only want to see them as one item. For instance a window would have a frame and glass and possibly a handle do you apply custom properties to each separate component individually?
I would only want to see that item as a window not as a window, a handle, and  glass - do you group them first?
« Last Edit: September 27, 2018, 11:09:31 PM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* September 28, 2018, 10:47:01 AM
#11
Hi Dean (and Nikki): I followed your keystrokes and what I learned is that Ctrl-space is shortcut for the "edit tool".

If I select a block and press Ctrl-space, the 'edit content' dialog opens; I can see the custom properties, but they're not the custom properties of the inserted block, they're the custom properties of the 'original' (for lack of a better word) block that lives wherever the originals live.  I can edit those custom properties and click the check mark (finish edit properties), but when I insert that block again, the custom properties are lost.  Most significantly, for the op, they don't show in the database.  So sad; assigning custom properties to a block is 'way faster than assigning block attributes.

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* September 28, 2018, 11:31:59 PM
#12
I am sure there must be a way to extract the information.
 Dean says you use the advanced report settings. I couldn't work out which settings to use, hence my earlier post.

I have another question about your method Dean
I am going to use a kitchen sink as an example.
I have a generic block for a sink- it is just a symbol. In my building the developer  wants a different model in a few kitchens.
I don't need to draw the sink exactly as it is but I do need to extract that information at a later date.
 Most of the sinks will be one model but you know clients there is always someone who needs to be different.
With attributes I can use the same block in each kitchen with the most common sink details as default, and edit the data in the block attribute for the exceptions.
How do you do that with your method?

« Last Edit: September 28, 2018, 11:48:08 PM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* October 02, 2018, 10:16:30 AM
#13
Hi Nikki,
I'm currently doing with hardware precisely what you describe for the kitchen sink example, using block attributes.   Custom properties are simply lost when a block is inserted; they get lost in v11.2 also.  (Ctrl-space is kind of a short cut to EC; it allows the properties of the original block to be modified, but those properties don't 'stick' to the block when it's inserted.)  I may post this to the "wish list" section.
ps:
For a detailed list, the database feature works to export selected block attributes.

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* October 02, 2018, 09:19:46 PM
#14
Version 11 you will probably have an issue because this was introduced later.
In the blocks palette there is a sync attributes icon at the top. click on the block name and then the icon -
 it is usually just the first block dragged from the library that doesn't have the attributes. I think that' s a bug.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* October 16, 2018, 05:47:29 PM
#15
Hi Nikki,
The feature I'm wanting to use is NOT "Block Attribute" (called an "AutoCAD informational text associated with a block" in the TCAD help document); that feature works fine (including the "sync attribute" function), but I find it 'clunky' for adding data, as compared to "custom properties", which is a database feature.  This is the feature I'm wanting to use, and these are the properties that disappear when the block is inserted.  I've attached two screenshots, just to show the custom properties table.  "Edit-content" shows properties of original block, in blocks palette; "inserted" shows properties of block after insertion.  I've got a ticket number from Imsi Support, but it's been 12 days since I've heard from them.

Logged
Pro 11.2
Pro Platinum 2017 64
I7 3770 3.4gHz 8gB


* October 16, 2018, 09:44:35 PM
#16
I honestly don't think you can use custom properties the way you want to use them.
I would also like them to work the way Dean described but I cant find a way to make them work that way.
 I do use custom properties with blocks but add them after the block is inserted into the drawing using the database connect palette.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* November 01, 2018, 09:38:25 AM
#17
I think I might have figured this out  - whilst trying to solve one of my own questions.
You can extract the custom data in the block as long as you don't use a selection criteria - it needs to search the whole drawing.
Set up the report
click on advanced report (at the top right)
and at the bottom make sure extract block entities is checked. Hopefully that will work for you too.
« Last Edit: November 01, 2018, 09:44:56 AM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks