accessing 'custom properties drawing'

accessing 'custom properties drawing'

johan
Enthusiast Enthusiast
3,357 Views
10 Replies
Message 1 of 11

accessing 'custom properties drawing'

johan
Enthusiast
Enthusiast

Hello,

 

As we translate every property to Dutch, I stumble now upon the impossibility to access the 'custom properties drawing' to be able to change a few things.

I have to say, I didn't change much since 2015, maybe I forgot how to do it.

Example:  when we place a view, automatically the name of the view is in Dutch. 

Now I can't change this anymore. How come? Look in the attach please. Normally there is no code involved.

 

custom properties drawing etc.jpg

 

Thanks for the help!

Johan

0 Likes
Accepted solutions (2)
3,358 Views
10 Replies
Replies (10)
Message 2 of 11

MechMachineMan
Advisor
Advisor

Have you reviewed your view annotation styles to make sure it lines up with what you want?

 

That's probably about as solid a start as you can get.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 3 of 11

rhasell
Advisor
Advisor

Hi

 

You might have to do this via iLogic. (That is if I understand, you want the default view label in the template to reflect a Drawing custom property)

 

Reg
2026.1
Message 4 of 11

rhasell
Advisor
Advisor
Accepted solution

The following is an extract from a sub routine, so it is a bit clunky, the rest of the code is much larger, but it is a start to get you on the correct path of being able to format your view labels.

 

Note, mine calls a custom property from the part and not the drawing.

I have commented out quite a bit, but left it there for reference purposes, hopefully it does not get in the way.

 

'Set view Label
Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.Count = 0 Then
	MessageBox.Show("You must select a drawing view first", "iLogic")
''Exit Sub
End If
'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView= TryCast(oSSet.Item(1), DrawingView)
oModel = ThisDoc.ModelDocument
If oView IsNot Nothing Then
oView.ShowLabel = True

'''Call project 'removed for forum
'MessageBox.Show(iProperties.Value("Project", "Project"), "Title")

'''oProject=iProperties.Value("Project", "Project")		
	'''	oItemValue= oProject & "_QTY"
'MessageBox.Show(oItemValue, "Title")
'Sub Set properties to create the Custom Fields, Without going into too much detail, I can't do this in one step

'''o_iPropID_QTY = oModel.PropertySets.Item("User Defined Properties").Item(oitemValue).PropId 'Custom QTY Field, defined above
o_iPropID_ENG = oModel.PropertySets.Item("User Defined Properties").Item("ENG").PropId

'format the model iproperties
	'''oStringQTY = "<StyleOverride Underline='True' FontSize='0.5' Bold='True'><Property Document='model' PropertySet='User Defined Properties' Property='customPropertyName' FormatID='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' PropertyID='" _
	 '''& o_iPropID_QTY & "'>customPropertyName </Property></StyleOverride>"
	 
	 oStringENG = "<StyleOverride Underline='True' FontSize='0.5' Bold='True'><Property Document='model' PropertySet='User Defined Properties' Property='customPropertyName' FormatID='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' PropertyID='" _
	 & o_iPropID_ENG & "'>customPropertyName </Property></StyleOverride>"
 
	oStringTXT = "<StyleOverride Underline='True' FontSize='0.5' Bold='False'> OFF - AS SHOWN - MARK AS - </StyleOverride>"
	oStringScale = "<Br/><StyleOverride FontSize='0.25'>SCALE <DrawingViewScale/></StyleOverride>"

'add to the view label
'removed following for the forum
'''oView.Label.FormattedText =  oStringQTY & oStringTXT & oStringENG & '''oStringScale
oView.Label.FormattedText =  oStringTXT & oStringENG & oStringScale

Else
	MessageBox.Show("The selected object is not a drawing view", "iLogic")
End If
Reg
2026.1
Message 5 of 11

johan
Enthusiast
Enthusiast

Hello,

 

Thanks for your response, but this goes beyond styles

How styles work and how to update, save and change them without having trouble, is a path I already passed.

So, yes, the styles are ok. 

 

It has to do with the "content" of the custom property, which changes. 

 

Now I have to make some drawings for my Arabic co-workers, so I would like to automatically appear the labels on the drawings in Arabic, without having to change it manually.

 

This is done in the template, but I'don't remember how I did it for Dutch, or this option has changed, disappeared, or whatever...

 

Please place a part into the idw I sent, you will see styles don't corrupt, and everything is in Dutch.

0 Likes
Message 6 of 11

johan
Enthusiast
Enthusiast

Hi,

 

Why should this be done in Ilogic, if we have access to custom drawing properties, which I don't or don't find.

Or are 'custom drawing properties' only accessible through I logic?

 

Thanks

Johan

0 Likes
Message 7 of 11

johan
Enthusiast
Enthusiast

@rhasellwrote:

The following is an extract from a sub routine, so it is a bit clunky, the rest of the code is much larger, but it is a start to get you on the correct path of being able to format your view labels.

 

Note, mine calls a custom property from the part and not the drawing.

I have commented out quite a bit, but left it there for reference purposes, hopefully it does not get in the way.

 

 

Hi Rashell,

 

I understand the code. So there is no other way than coding? There is no coding in the IDW i sent with the first post. How does it still work then?

 

I'll give your code a try.

 

Thanks for leaving residual code, it gives insight.

 

Regards

Johan

Hope I can post the solution for everybody who wants to make drawings with custom labels in custom languages...

 

0 Likes
Message 8 of 11

MechMachineMan
Advisor
Advisor

@johan when you are making the template, place a view that has a part that has all of the relevant custom iProperties in it. Then delete the view/references to the part once the iProperties have been grabbed for the relevant dialog boxes.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 9 of 11

bradeneuropeArthur
Mentor
Mentor
Accepted solution

View.png

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 10 of 11

johan
Enthusiast
Enthusiast

Didn't try it yet, because of work charge. WIll do it as soon as I can work with unwanted 'errors', so I have time. But I think your solution will be the best one. 
Just place a part with relevant Iproperties, and then continue like you say.

 

Allthough, the code seems very interesting too, and is more controllable.

 

I'l give feedback about both in a while.

 

Thanks for your response. I will check them both as helpfull

 

Johan

0 Likes
Message 11 of 11

rhasell
Advisor
Advisor

Hi

 

The drawing file you shared does not have a working solution in it.

 

Are you able to post a file that has a working solution in it? (If the file you have is working for you, then there is something else at play here)

All I could was place one of my own components into the file and see if I could access the custom iProperties for the view label.

 

The only way to change it, is to edit the view label and change it to a custom property (As you indicated in  your post), but there is no way to transfer that custom iProperty to the template and have it as a default view label. Thats why I use iLogic to achieve this, as it can reformat the view label in a snap.

 

The section of code I shared calls for a custom iProperty of "ENG" from the part/Assembly, the quick way to check on any adjustments, is to search the Inventor API help file for the  User Defined Properties etc. (I also commented out an additional field of the QTY, which is created form another rule in the GA.)

 

Hope it makes sense.

Reg
2026.1
0 Likes