Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help Fixing iLogic Code - Change Custom Properties

3 REPLIES 3
Reply
Message 1 of 4
DeerSpotter
382 Views, 3 Replies

Help Fixing iLogic Code - Change Custom Properties

<Subassembly document name>” = iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")

 

iProperties.ValueInDoc("<Subassembly document name>.iam", "Custom", "CUSTOMER P.O. NUMBER")= Ucase(InputBox("CUSTOMER P.O. NUMBER?", "Create Customer P.O.#", iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")))

 Wondering why this doesnt work for me. 😕 please could someone help me? If anything try to explain to me why it didnt work?

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
3 REPLIES 3
Message 2 of 4
mrattray
in reply to: DeerSpotter

 

What does this line do? It doesn't make any sense.

<Subassembly document name>” = iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")

I think you want this:

 

iProperties.ValueInDoc("<Subassembly document name>.iam", "Custom", "CUSTOMER P.O. NUMBER")= UCase(InputBox("CUSTOMER P.O. NUMBER?", "Create Customer P.O.#", iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")))

 To read this:

iProperties.Value("<Subassembly document name>.iam", "Custom", "CUSTOMER P.O. NUMBER")= UCase(InputBox("CUSTOMER P.O. NUMBER?", "Create Customer P.O.#", iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")))

 

 

 

 

Mike (not Matt) Rattray

Message 3 of 4
DeerSpotter
in reply to: mrattray

I understand a little now, about what you did here, im learning finally.

 

i want to subassembly.iam name to be asked for or inputed automatically fromm the ducument im running from.

 

I will be running this code from the DWG's.

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
Message 4 of 4
mrattray
in reply to: DeerSpotter

Try this:

Dim asyName As String

asyName = InputBox("Sub-assembly document file name?","Sub-assembly document file name?","my sub assembly.iam")

iProperties.Value(asyName, "Custom", "CUSTOMER P.O. NUMBER")= UCase(InputBox("CUSTOMER P.O. NUMBER?", "Create Customer P.O.#", iProperties.Value("Custom", "CUSTOMER P.O. NUMBER")))

 We can get more complex if you wish. We could loop thorugh every occurence in the top level assembly and gather the file names for every sub assembly...

 

 

Mike (not Matt) Rattray

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

Post to forums  

Autodesk Design & Make Report