Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add Part Title To Save Name Macro

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
jkunLLJ2Y
457 Views, 7 Replies

Add Part Title To Save Name Macro

jkunLLJ2Y
Participant
Participant

I have a working macro for saving a file, however I need to add the title of the part to the end of the file name, and I cannot find the code for it.

 

oDataMedium.FileName = "U:\DWF\" & onamefile & " " & TITLE & ".dwf"

 

 

0 Likes

Add Part Title To Save Name Macro

I have a working macro for saving a file, however I need to add the title of the part to the end of the file name, and I cannot find the code for it.

 

oDataMedium.FileName = "U:\DWF\" & onamefile & " " & TITLE & ".dwf"

 

 

7 REPLIES 7
Message 2 of 8
A.Acheson
in reply to: jkunLLJ2Y

A.Acheson
Mentor
Mentor

@jkunLLJ2Y 

 

Are you using VBA or iLogic? This is a list for ilogic snippets.

https://adndevblog.typepad.com/manufacturing/2018/04/accessing-iproperties-through-ilogic-code.html

 

If I am correct you can not use ilogic snippets in VBA and need to use property sets. Perhaps you can verify if they work?

https://modthemachine.typepad.com/my_weblog/2010/02/accessing-iproperties.html

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

@jkunLLJ2Y 

 

Are you using VBA or iLogic? This is a list for ilogic snippets.

https://adndevblog.typepad.com/manufacturing/2018/04/accessing-iproperties-through-ilogic-code.html

 

If I am correct you can not use ilogic snippets in VBA and need to use property sets. Perhaps you can verify if they work?

https://modthemachine.typepad.com/my_weblog/2010/02/accessing-iproperties.html

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 8
jkunLLJ2Y
in reply to: A.Acheson

jkunLLJ2Y
Participant
Participant

I am using VBA, and there is no "Title" code in the PropertySets that I could find.

0 Likes

I am using VBA, and there is no "Title" code in the PropertySets that I could find.

Message 4 of 8
A.Acheson
in reply to: jkunLLJ2Y

A.Acheson
Mentor
Mentor

Here is a more up to date list and you can extract a list of your current inventor release. 

https://modthemachine.typepad.com/my_weblog/iproperties/

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

Here is a more up to date list and you can extract a list of your current inventor release. 

https://modthemachine.typepad.com/my_weblog/iproperties/

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 8
jkunLLJ2Y
in reply to: A.Acheson

jkunLLJ2Y
Participant
Participant

I tried that, the "Title / 2"

 

However it just spits out a 0

0 Likes

I tried that, the "Title / 2"

 

However it just spits out a 0

Message 6 of 8
A.Acheson
in reply to: jkunLLJ2Y

A.Acheson
Mentor
Mentor

@jkunLLJ2Y 

 

Can you try the sample read iproperty sub in the image and change the property set and property as the per the chart referencing title. Failing that post the code your using to extract the title string from the file.  

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

@jkunLLJ2Y 

 

Can you try the sample read iproperty sub in the image and change the property set and property as the per the chart referencing title. Failing that post the code your using to extract the title string from the file.  

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 7 of 8
jkunLLJ2Y
in reply to: A.Acheson

jkunLLJ2Y
Participant
Participant

Capture.PNG

I'm not sure exactly what you mean, but this is what I have now.

0 Likes

Capture.PNG

I'm not sure exactly what you mean, but this is what I have now.

Message 8 of 8
jkunLLJ2Y
in reply to: jkunLLJ2Y

jkunLLJ2Y
Participant
Participant
Accepted solution

I figured it out.


Dim oDoc As String
oDoc = ThisApplication.ActiveDocument.PropertySets.Item(1).Item(1).Value

 

Thanks for the help.

I figured it out.


Dim oDoc As String
oDoc = ThisApplication.ActiveDocument.PropertySets.Item(1).Item(1).Value

 

Thanks for the help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report